bd0961a40b
Signed-off-by: GuillaumeFalourd <guillaume.falourd@zup.com.br> |
||
---|---|---|
.github/workflows | ||
reports | ||
action.yml | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md |
Push and Commit action
GitHub Action to commit & push changes made in workflows to upstream repository :octocat:
Note: This action is supported on all runners operating systems (ubuntu
, macos
, windows
)
📚 Usage
Requirements
⚠️ The actions/checkout
is mandatory to use this action, as it will be necessary to access the repository files.
♻️ Scenarios
1️⃣ Minimal
Commit and Push with default
parameters
steps:
- uses: actions/checkout@v2.3.4
# [...] --> steps with actions or commands updating repository files
- uses: GuillaumeFalourd/git-commit-push@v1
2️⃣ Full
Commit and Push with customized
parameters
steps:
- uses: actions/checkout@v2.3.4
# [...] --> steps with actions or commands updating repository files
- uses: GuillaumeFalourd/git-commit-push@v1
with:
email: ${{ github.actor }}@users.noreply.github.com
name: ${{ github.actor }}
commit_message: your_message
target_branch: target_branch_name
files: file1 file2 directory1 directory2/file3
remote_repository: https://github.com/owner/another_repository
access_token: ${{ github.token }}
force: true
empty: true
tags: true
▶️ Action Inputs
Field | Mandatory | Default Value | Observation
------------ | ------------ | -------------
email | NO | ${{ github.actor }}@users.noreply.github.com
| Github user email
e.g: octocat@github.com
name | NO | ${{ github.actor }}
| Github username
e.g: octocat
commit_message | NO | | The commit message
target_branch | NO | ${{ github.ref }}
| The branch to push the changes back to
files | NO | .
(all) | The files to add separated by space
e.g: file1 file2 directory1 directory2/file3
remote_repository | NO | origin
| The repository to push the code to
access_token | NO | ${{ github.token }}
| Personal Access Token (necessary if push to another repository).
force | NO | | Whether to perform force push
empty | NO | | Whether to allow empty commit
tags | NO | | Whether to use --tags
🤝 Contributing
🏅 Licensed
☞ This repository uses the Apache License 2.0