Skip to content

Commit 4b584b8

Browse files
Update action versions (#163)
Co-authored-by: ChristophShyper <[email protected]>
1 parent e6a24fa commit 4b584b8

File tree

1 file changed

+49
-50
lines changed

1 file changed

+49
-50
lines changed

README.md

Lines changed: 49 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# 🚀 GitHub Action for Committing Changes to Repository
22

3+
34
### 🏗️ Multi-Architecture Support: `amd64` and `aarch64/arm64`
45

6+
57
### ⚠️ Recent Changes in v0.11.0
68
- **Force behavior updated**: `force: true` now uses `git push --force` (breaking change)
79
- **New parameter**: `force_with_lease` for safer force pushing with `--force-with-lease`
@@ -10,9 +12,10 @@
1012

1113
A powerful GitHub Action for automatically committing and pushing changes back to your repository. Perfect for automation workflows and integrates seamlessly with [devops-infra/action-pull-request](https://github.com/devops-infra/action-pull-request).
1214

15+
1316
## 📦 Available on
1417
- **Docker Hub:** [devopsinfra/action-commit-push:latest](https://hub.docker.com/repository/docker/devopsinfra/action-commit-push)
15-
- **GitHub Packages:** [ghcr.io/devops-infra/action-commit-push/action-commit-push:latest](https://github.com/orgs/devops-infra/packages/container/package/action-commit-push)
18+
- **GitHub Packages:** [ghcr.io/devops-infra/action-commit-push:latest](https://github.com/orgs/devops-infra/packages/container/package/action-commit-push)
1619

1720

1821
## ✨ Features
@@ -44,40 +47,40 @@ A powerful GitHub Action for automatically committing and pushing changes back t
4447
## 📖 API Reference
4548

4649
```yaml
47-
- name: Run the Action
48-
uses: devops-infra/action-commit-push@master
49-
with:
50-
github_token: "${{ secrets.GITHUB_TOKEN }}"
51-
add_timestamp: true
52-
commit_prefix: "[AUTO]"
53-
commit_message: "Automatic commit"
54-
force: false
55-
force_with_lease: false
56-
target_branch: update/version
50+
- name: Run the Action
51+
uses: devops-infra/action-commit-push@master
52+
with:
53+
github_token: "${{ secrets.GITHUB_TOKEN }}"
54+
add_timestamp: true
55+
commit_prefix: "[AUTO]"
56+
commit_message: "Automatic commit"
57+
force: false
58+
force_with_lease: false
59+
target_branch: update/version
5760
```
5861
5962
6063
### 🔧 Input Parameters
6164
62-
| Input Variable | Required | Default | Description |
63-
| ------------------- | -------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
64-
| github_token | Yes | `""` | Personal Access Token for GitHub for pushing the code. |
65-
| add_timestamp | No | `false` | Whether to add the timestamp to a new branch name. Uses format `%Y-%m-%dT%H-%M-%SZ`. |
66-
| amend | No | `false` | Whether to make an amendment to the previous commit (`--amend`). Can be combined with `commit_message` to change the commit message. |
67-
| commit_prefix | No | `""` | Prefix added to commit message. Combines with `commit_message`. |
68-
| commit_message | No | `""` | Commit message to set. Combines with `commit_prefix`. Can be used with `amend` to change the commit message. |
69-
| force | No | `false` | Whether to use force push (`--force`). Use only when you need to overwrite remote changes. Potentially dangerous. |
70-
| force_with_lease | No | `false` | Whether to use force push with lease (`--force-with-lease`). Safer than `force` as it checks for remote changes. Set `fetch-depth: 0` for `actions/checkout`. |
71-
| no_edit | No | `false` | Whether to not edit commit message when using amend (`--no-edit`). |
72-
| organization_domain | No | `github.com` | GitHub Enterprise domain name. |
73-
| target_branch | No | *current branch* | Name of a new branch to push the code into. Creates branch if not existing. |
65+
| Input Variable | Required | Default | Description |
66+
|---------------------|----------|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
67+
| github_token | Yes | `""` | Personal Access Token for GitHub for pushing the code. |
68+
| add_timestamp | No | `false` | Whether to add the timestamp to a new branch name. Uses format `%Y-%m-%dT%H-%M-%SZ`. |
69+
| amend | No | `false` | Whether to make an amendment to the previous commit (`--amend`). Can be combined with `commit_message` to change the commit message. |
70+
| commit_prefix | No | `""` | Prefix added to commit message. Combines with `commit_message`. |
71+
| commit_message | No | `""` | Commit message to set. Combines with `commit_prefix`. Can be used with `amend` to change the commit message. |
72+
| force | No | `false` | Whether to use force push (`--force`). Use only when you need to overwrite remote changes. Potentially dangerous. |
73+
| force_with_lease | No | `false` | Whether to use force push with lease (`--force-with-lease`). Safer than `force` as it checks for remote changes. Set `fetch-depth: 0` for `actions/checkout`. |
74+
| no_edit | No | `false` | Whether to not edit commit message when using amend (`--no-edit`). |
75+
| organization_domain | No | `github.com` | GitHub Enterprise domain name. |
76+
| target_branch | No | *current branch* | Name of a new branch to push the code into. Creates branch if not existing. |
7477

7578
### 📤 Output Parameters
7679

77-
| Output | Description |
78-
| ------------- | -------------------------------------------------------------------------- |
80+
| Output | Description |
81+
|---------------|--------------------------------------------------------------------------|
7982
| files_changed | List of changed files, as returned by `git diff --staged --name-status`. |
80-
| branch_name | Name of the branch code was pushed into. |
83+
| branch_name | Name of the branch code was pushed into. |
8184

8285

8386
## 💻 Usage Examples
@@ -95,12 +98,12 @@ jobs:
9598
runs-on: ubuntu-latest
9699
steps:
97100
- name: Checkout repository
98-
uses: actions/checkout@v4
101+
uses: actions/checkout@v5
99102
- name: Change something
100103
run: |
101104
find . -type f -name "*.md" -print0 | xargs -0 sed -i "s/foo/bar/g"
102105
- name: Commit and push changes
103-
uses: devops-infra/action-commit-push@master
106+
uses: devops-infra/action-commit-push@v0.11
104107
with:
105108
github_token: ${{ secrets.GITHUB_TOKEN }}
106109
commit_message: "Replace foo with bar"
@@ -119,18 +122,18 @@ jobs:
119122
runs-on: ubuntu-latest
120123
steps:
121124
- name: Checkout repository
122-
uses: actions/checkout@v4
125+
uses: actions/checkout@v5
123126
- name: Change something
124127
run: |
125128
find . -type f -name "*.md" -print0 | xargs -0 sed -i "s/foo/bar/g"
126129
- name: Commit and push changes
127-
uses: devops-infra/action-commit-push@master
130+
uses: devops-infra/action-commit-push@v.11
128131
with:
129132
github_token: ${{ secrets.GITHUB_TOKEN }}
130133
commit_prefix: "[AUTO-COMMIT] "
131134
commit_message: "Replace foo with bar"
132135
- name: Create pull request
133-
uses: devops-infra/action-pull-request@master
136+
uses: devops-infra/action-pull-request@v0.6
134137
with:
135138
github_token: ${{ secrets.GITHUB_TOKEN }}
136139
body: "**Automated pull request**<br><br>Replaced foo with bar"
@@ -156,14 +159,14 @@ jobs:
156159
runs-on: ubuntu-latest
157160
steps:
158161
- name: Checkout repository with full history
159-
uses: actions/checkout@v4
162+
uses: actions/checkout@v5
160163
with:
161164
fetch-depth: 0 # Required for force_with_lease
162165
- name: Make some changes
163166
run: |
164167
echo "Additional content" >> README.md
165168
- name: Amend and force push with lease
166-
uses: devops-infra/action-commit-push@master
169+
uses: devops-infra/action-commit-push@v0.11
167170
with:
168171
github_token: ${{ secrets.GITHUB_TOKEN }}
169172
commit_message: ${{ github.event.inputs.new_commit_message }}
@@ -200,38 +203,35 @@ When using `amend: true`, you have several options for handling the commit messa
200203
**💡 Note:** Amending works even without file changes - useful for just changing commit messages!
201204

202205

203-
## 🎯 Version Usage Options
206+
## 🏷️ Version Tags: vX, vX.Y, vX.Y.Z
204207

205-
You can use this action in different ways depending on your needs:
208+
This action supports three tag levels for flexible versioning:
206209

207-
### 🔄 Latest Version (Recommended)
210+
- **`vX`**: Always points to the latest patch of a major version (e.g., `v1` → `v1.2.3`).
211+
_Benefit: Get all latest fixes for a major version automatically._
208212

209-
```yaml
210-
- uses: devops-infra/action-commit-push@master
211-
```
212-
213-
Always uses the latest release. Automatically gets new features and fixes.
214-
215-
### 📌 Pinned Version (Stable)
213+
- **`vX.Y`**: Always points to the latest patch of a minor version (e.g., `v1.2` → `v1.2.3`).
214+
_Benefit: Stay on a minor version, always up-to-date with bugfixes._
216215

217-
```yaml
218-
- uses: devops-infra/[email protected]
219-
```
216+
- **`vX.Y.Z`**: Fixed to a specific release (e.g., `v1.2.3`).
217+
_Benefit: Full reproducibility—never changes._
220218

221-
Uses a specific version. More predictable but requires manual updates.
219+
**Use the tag depth that matches your stability needs.**
222220

223221

224222
## ⚠️ Force Push Options
225223

226224
This action provides two force push options for different scenarios:
227225

226+
228227
### 🛡️ `force_with_lease` (Recommended)
229228
- Uses `git push --force-with-lease`
230229
- **Safer option** that checks if someone else has pushed changes to the remote branch
231230
- Prevents accidentally overwriting other people's work
232231
- **Required:** Set `fetch-depth: 0` in your `actions/checkout` step
233232
- **Use case:** Amending commits, rebasing, or other history modifications
234233

234+
235235
### ⚡ `force` (Use with Caution)
236236
- Uses `git push --force`
237237
- **Potentially dangerous** as it will overwrite remote changes unconditionally
@@ -243,7 +243,7 @@ This action provides two force push options for different scenarios:
243243

244244
## 🤝 Contributing
245245

246-
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
246+
Contributions are welcome! Please feel free to submit a Pull Request. Refer to the [CONTRIBUTING](https://github.com/devops-infra/.github/blob/master/CONTRIBUTING.md) for guidelines.
247247

248248

249249
## 📄 License
@@ -259,6 +259,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
259259
## 💬 Support
260260

261261
If you have any questions or need help, please:
262-
- 📝 Create an [issue](https://github.com/devops-infra/action-commit-push/issues)
263-
- 💬 Start a [discussion](https://github.com/devops-infra/action-commit-push/discussions)
262+
- 📝 Create an [issue](https://github.com/devops-infra/template-action/issues)
264263
- 🌟 Star this repository if you find it useful!

0 commit comments

Comments
 (0)