A composite action for pushing a git branch.
This requires contents: write
permissions in order to work correctly.
Name | Description | Default |
---|---|---|
branch (*) |
The name of the branch to push | N/A |
force |
Whether to force-push this branch | "false" |
target-commitish |
The commit to push as the new branch | "HEAD" |
Note: (*) marks required inputs
git/push
does not have any outputs at this time
Here is a very basic example of how to use the git/push
composite action
in a project (placeholders are used in place of real inputs):
run:
example-job:
# ...
steps:
# ...
- name: Push a git branch
uses: bitwizeshift/actions-github/git/push@v1
with:
# Required inputs
branch: BRANCH
# Optional inputs
force: FORCE
target-commitish: TARGET_COMMITISH