GitHub Action
Create/Update tag
Simple (docker-based) GitHub action that can be used to create/update a tag and push it to the remote.
Note
Since this is a docker-based action and GitHub currently only supports Linux-based containers running this action on Windows and Mac now needs to be supported (see #26).
Required. Tag you want to create.
Optional. Tag message. Default: Release $TAG
.
Optional. Push tag even if it already exists on the remote. Default: false
. Please use with care!
Optional. Whether to throw an error when the tag already exists. Default: true
. Ignored when force_push_tag
is true
.
Optional. Skips verifying when pushing the tag. Default: false
. Please use with care!
Optional. Specify the commit SHA hash for tagging. By default, it utilizes the GITHUB_SHA
environment variable, which typically represents the latest commit SHA hash. However, its value ultimately depends on the trigger event of the workflow. For additional details, consult the GitHub Actions documentation.
Optional. It's no need to specify it if you use checkout@v2. Required for checkout@v1 action.
A boolean specifying whether the tag already exists.
A boolean specifying whether the tag already exists.
name: Create/update tag
on:
push:
branch: "main"
jobs:
create-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: rickstaa/action-create-tag@v1
id: "tag_create"
with:
tag: "latest"
tag_exists_error: false
message: "Latest release"
# Print result using the env variable.
- run: |
echo "Tag already present: ${{ env.TAG_EXISTS }}"
# Print result using the action output.
- run: |
echo "Tag already present: ${{ steps.tag_create.outputs.tag_exists }}"
Feel free to open an issue if you have ideas on how to make this GitHub action better or if you want to report a bug! All contributions are welcome. 🚀 Please consult the contribution guidelines for more information.