actions-js / push

⬆️ Push changes made by actions right back into the current repository.
MIT License
89 stars 51 forks source link

feat: change `branch` default to current branch #16

Closed WaterLemons2k closed 9 months ago

WaterLemons2k commented 1 year ago

The default value of inputs branch is now main, which is fine on the main branch, but needs to be changed when switching to another branch.

Changing the value to ${{ github.head_ref || github.ref_name }} will automatically get the current branch name. github.head_ref will be used when triggered by pull_request and github.ref_name will be used when triggered by push.

Reference: https://stackoverflow.com/a/71158878

WaterLemons2k commented 1 year ago

Also, should we add a default value for the inputs github_token?