This is an action to push files using GitHub API.
To create a commit to a branch or tag:
jobs:
build:
steps:
- uses: int128/create-commit-action@v1
with:
repository: ${{ github.repository }}
ref: refs/heads/branch-name
path: glob-pattern
message: your-commit-message
If a branch or tag does not exist, this action creates it from default branch. Otherwise, this action updates it by fast-forward.
This action performs the following steps:
- Upload file(s) as blob
- Get the current commit and tree of a ref
- Create a tree
- Create a commit
- Create or update a ref
This action will retry from step 2 if the optimistic lock fails, that is,
- The ref has been updated after step 2
- The ref did not exist at step 2 but exists at step 5