From f3b8535df73819b06b311b39bc957c6e62bd7f8d Mon Sep 17 00:00:00 2001
From: ChristophShyper <45788587+ChristophShyper@users.noreply.github.com>
Date: Wed, 13 Aug 2025 21:58:27 +0200
Subject: [PATCH] Update action versions
---
README.md | 99 +++++++++++++++++++++++++++----------------------------
1 file changed, 49 insertions(+), 50 deletions(-)
diff --git a/README.md b/README.md
index 2c9431f..0763b57 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
# π GitHub Action for Committing Changes to Repository
+
### ποΈ Multi-Architecture Support: `amd64` and `aarch64/arm64`
+
### β οΈ Recent Changes in v0.11.0
- **Force behavior updated**: `force: true` now uses `git push --force` (breaking change)
- **New parameter**: `force_with_lease` for safer force pushing with `--force-with-lease`
@@ -10,9 +12,10 @@
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).
+
## π¦ Available on
- **Docker Hub:** [devopsinfra/action-commit-push:latest](https://hub.docker.com/repository/docker/devopsinfra/action-commit-push)
-- **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)
+- **GitHub Packages:** [ghcr.io/devops-infra/action-commit-push:latest](https://github.com/orgs/devops-infra/packages/container/package/action-commit-push)
## β¨ Features
@@ -44,40 +47,40 @@ A powerful GitHub Action for automatically committing and pushing changes back t
## π API Reference
```yaml
- - name: Run the Action
- uses: devops-infra/action-commit-push@master
- with:
- github_token: "${{ secrets.GITHUB_TOKEN }}"
- add_timestamp: true
- commit_prefix: "[AUTO]"
- commit_message: "Automatic commit"
- force: false
- force_with_lease: false
- target_branch: update/version
+ - name: Run the Action
+ uses: devops-infra/action-commit-push@master
+ with:
+ github_token: "${{ secrets.GITHUB_TOKEN }}"
+ add_timestamp: true
+ commit_prefix: "[AUTO]"
+ commit_message: "Automatic commit"
+ force: false
+ force_with_lease: false
+ target_branch: update/version
```
### π§ Input Parameters
-| Input Variable | Required | Default | Description |
-| ------------------- | -------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| github_token | Yes | `""` | Personal Access Token for GitHub for pushing the code. |
-| add_timestamp | No | `false` | Whether to add the timestamp to a new branch name. Uses format `%Y-%m-%dT%H-%M-%SZ`. |
-| amend | No | `false` | Whether to make an amendment to the previous commit (`--amend`). Can be combined with `commit_message` to change the commit message. |
-| commit_prefix | No | `""` | Prefix added to commit message. Combines with `commit_message`. |
-| commit_message | No | `""` | Commit message to set. Combines with `commit_prefix`. Can be used with `amend` to change the commit message. |
-| force | No | `false` | Whether to use force push (`--force`). Use only when you need to overwrite remote changes. Potentially dangerous. |
-| 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`. |
-| no_edit | No | `false` | Whether to not edit commit message when using amend (`--no-edit`). |
-| organization_domain | No | `github.com` | GitHub Enterprise domain name. |
-| target_branch | No | *current branch* | Name of a new branch to push the code into. Creates branch if not existing. |
+| Input Variable | Required | Default | Description |
+|---------------------|----------|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| github_token | Yes | `""` | Personal Access Token for GitHub for pushing the code. |
+| add_timestamp | No | `false` | Whether to add the timestamp to a new branch name. Uses format `%Y-%m-%dT%H-%M-%SZ`. |
+| amend | No | `false` | Whether to make an amendment to the previous commit (`--amend`). Can be combined with `commit_message` to change the commit message. |
+| commit_prefix | No | `""` | Prefix added to commit message. Combines with `commit_message`. |
+| commit_message | No | `""` | Commit message to set. Combines with `commit_prefix`. Can be used with `amend` to change the commit message. |
+| force | No | `false` | Whether to use force push (`--force`). Use only when you need to overwrite remote changes. Potentially dangerous. |
+| 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`. |
+| no_edit | No | `false` | Whether to not edit commit message when using amend (`--no-edit`). |
+| organization_domain | No | `github.com` | GitHub Enterprise domain name. |
+| target_branch | No | *current branch* | Name of a new branch to push the code into. Creates branch if not existing. |
### π€ Output Parameters
-| Output | Description |
-| ------------- | -------------------------------------------------------------------------- |
+| Output | Description |
+|---------------|--------------------------------------------------------------------------|
| files_changed | List of changed files, as returned by `git diff --staged --name-status`. |
-| branch_name | Name of the branch code was pushed into. |
+| branch_name | Name of the branch code was pushed into. |
## π» Usage Examples
@@ -95,12 +98,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- name: Change something
run: |
find . -type f -name "*.md" -print0 | xargs -0 sed -i "s/foo/bar/g"
- name: Commit and push changes
- uses: devops-infra/action-commit-push@master
+ uses: devops-infra/action-commit-push@v0.11
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: "Replace foo with bar"
@@ -119,18 +122,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- name: Change something
run: |
find . -type f -name "*.md" -print0 | xargs -0 sed -i "s/foo/bar/g"
- name: Commit and push changes
- uses: devops-infra/action-commit-push@master
+ uses: devops-infra/action-commit-push@v.11
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_prefix: "[AUTO-COMMIT] "
commit_message: "Replace foo with bar"
- name: Create pull request
- uses: devops-infra/action-pull-request@master
+ uses: devops-infra/action-pull-request@v0.6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
body: "**Automated pull request**
Replaced foo with bar"
@@ -156,14 +159,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository with full history
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
fetch-depth: 0 # Required for force_with_lease
- name: Make some changes
run: |
echo "Additional content" >> README.md
- name: Amend and force push with lease
- uses: devops-infra/action-commit-push@master
+ uses: devops-infra/action-commit-push@v0.11
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: ${{ github.event.inputs.new_commit_message }}
@@ -200,31 +203,27 @@ When using `amend: true`, you have several options for handling the commit messa
**π‘ Note:** Amending works even without file changes - useful for just changing commit messages!
-## π― Version Usage Options
+## π·οΈ Version Tags: vX, vX.Y, vX.Y.Z
-You can use this action in different ways depending on your needs:
+This action supports three tag levels for flexible versioning:
-### π Latest Version (Recommended)
+- **`vX`**: Always points to the latest patch of a major version (e.g., `v1` β `v1.2.3`).
+ _Benefit: Get all latest fixes for a major version automatically._
-```yaml
-- uses: devops-infra/action-commit-push@master
-```
-
-Always uses the latest release. Automatically gets new features and fixes.
-
-### π Pinned Version (Stable)
+- **`vX.Y`**: Always points to the latest patch of a minor version (e.g., `v1.2` β `v1.2.3`).
+ _Benefit: Stay on a minor version, always up-to-date with bugfixes._
-```yaml
-- uses: devops-infra/action-commit-push@v0.11
-```
+- **`vX.Y.Z`**: Fixed to a specific release (e.g., `v1.2.3`).
+ _Benefit: Full reproducibilityβnever changes._
-Uses a specific version. More predictable but requires manual updates.
+**Use the tag depth that matches your stability needs.**
## β οΈ Force Push Options
This action provides two force push options for different scenarios:
+
### π‘οΈ `force_with_lease` (Recommended)
- Uses `git push --force-with-lease`
- **Safer option** that checks if someone else has pushed changes to the remote branch
@@ -232,6 +231,7 @@ This action provides two force push options for different scenarios:
- **Required:** Set `fetch-depth: 0` in your `actions/checkout` step
- **Use case:** Amending commits, rebasing, or other history modifications
+
### β‘ `force` (Use with Caution)
- Uses `git push --force`
- **Potentially dangerous** as it will overwrite remote changes unconditionally
@@ -243,7 +243,7 @@ This action provides two force push options for different scenarios:
## π€ Contributing
-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.
+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.
## π License
@@ -259,6 +259,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
## π¬ Support
If you have any questions or need help, please:
-- π Create an [issue](https://github.com/devops-infra/action-commit-push/issues)
-- π¬ Start a [discussion](https://github.com/devops-infra/action-commit-push/discussions)
+- π Create an [issue](https://github.com/devops-infra/template-action/issues)
- π Star this repository if you find it useful!