{"id":16539465,"url":"https://github.com/rickstaa/action-create-tag","last_synced_at":"2025-04-05T02:12:20.948Z","repository":{"id":39866659,"uuid":"328793653","full_name":"rickstaa/action-create-tag","owner":"rickstaa","description":"Simple GitHub action that can be used to create a tag inside a GitHub action.","archived":false,"fork":false,"pushed_at":"2024-05-23T17:10:00.000Z","size":75,"stargazers_count":72,"open_issues_count":8,"forks_count":32,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-25T08:50:37.592Z","etag":null,"topics":["docker","gh-action","github-action-docker","github-actions","tagging","utilities"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/create-update-tag","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rickstaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["rickstaa"]}},"created_at":"2021-01-11T21:17:04.000Z","updated_at":"2024-07-18T15:55:26.000Z","dependencies_parsed_at":"2023-10-14T15:33:21.370Z","dependency_job_id":"4e9fbe2e-ea3c-43b1-8ab2-ceefac8bdb65","html_url":"https://github.com/rickstaa/action-create-tag","commit_stats":{"total_commits":51,"total_committers":7,"mean_commits":7.285714285714286,"dds":"0.27450980392156865","last_synced_commit":"84c90e6ba79b47b5147dcb11ff25d6a0e06238ba"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Faction-create-tag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Faction-create-tag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Faction-create-tag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Faction-create-tag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rickstaa","download_url":"https://codeload.github.com/rickstaa/action-create-tag/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276189,"owners_count":20912288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","gh-action","github-action-docker","github-actions","tagging","utilities"],"created_at":"2024-10-11T18:49:09.885Z","updated_at":"2025-04-05T02:12:20.918Z","avatar_url":"https://github.com/rickstaa.png","language":"Shell","readme":"# GitHub Action: Create/update tag\n\n[![Docker Image CI](https://github.com/rickstaa/action-create-tag/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/rickstaa/action-create-tag/actions)\n[![Code quality CI](https://github.com/rickstaa/action-create-tag/workflows/Code%20quality%20CI/badge.svg)](https://github.com/rickstaa/action-create-tag/actions?query=workflow%3A%22Code+quality+CI%22)\n[![release](https://github.com/rickstaa/action-create-tag/workflows/release/badge.svg)](https://github.com/rickstaa/action-create-tag/actions?query=workflow%3Arelease)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/rickstaa/action-create-tag?logo=github\u0026sort=semver)](https://github.com/rickstaa/action-create-tag/releases)\n\nSimple (docker-based) GitHub action that can be used to create/update a tag and push it to the remote.\n\n\u003e [!NOTE]\\\n\u003e Since this is a docker-based action and [GitHub currently only supports Linux-based containers](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action) running this action on Windows and Mac now needs to be supported (see [#26](https://github.com/rickstaa/action-create-tag/issues/26)).\n\n## Inputs\n\n### `tag`\n\n**Required**. Tag you want to create.\n\n### `message`\n\n**Optional**. Tag message. Default: `Release $TAG`.\n\n### `force_push_tag`\n\n**Optional**. Push tag even if it already exists on the remote. Default: `false`. Please use with care!\n\n### `tag_exists_error`\n\n**Optional**. Whether to throw an error when the tag already exists. Default: `true`. Ignored when `force_push_tag` is `true`.\n\n### `no_verify_tag`\n\n**Optional**. Skips verifying when pushing the tag. Default: `false`. Please use with care!\n\n### `commit_sha`\n\n**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](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context).\n\n### `github_token`\n\n**Optional**. It's no need to specify it if you use checkout@v2. Required for\ncheckout@v1 action.\n\n### `gpg_private_key`\n\n**Optional**. Specifies the GPG private key to sign the tag with. Default: `\"\"`.\n\n### `gpg_passphrase`\n\n**Optional**. Specifies the GPG passphrase to sign the tag with. Default: `\"\"`.\n\n## Outputs\n\n### `tag_exists`\n\nA boolean specifying whether the tag already exists.\n\n## Environment variables\n\n### `TAG_EXISTS`\n\nA boolean specifying whether the tag already exists.\n\n## Example Usage\n\n### General example\n\n```yml\nname: Create/update tag\non:\n  push:\n    branch: \"main\"\njobs:\n  create-tag:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n      - uses: rickstaa/action-create-tag@v1\n        id: \"tag_create\"\n        with:\n          tag: \"latest\"\n          tag_exists_error: false\n          message: \"Latest release\"\n\n      # Print result using the env variable.\n      - run: |\n        echo \"Tag already present: ${{ env.TAG_EXISTS }}\"\n\n      # Print result using the action output.\n      - run: |\n        echo \"Tag already present: ${{ steps.tag_create.outputs.tag_exists }}\"\n```\n\n### Signing Tags with GPG\n\nTo sign tags with GPG, follow these steps:\n\n#### 1. Generate a GPG Key\n\nFirst, [generate a GPG key](https://docs.github.com/en/github/authenticating-to-github/generating-a-new-gpg-key). Once generated, export the GPG private key in ASCII armored format to your clipboard using one of the following commands based on your operating system:\n\n- **macOS:**\n\n  ```shell\n  gpg --armor --export-secret-key joe@foo.bar | pbcopy\n  ```\n\n- **Ubuntu (GNU base64):**\n\n  ```shell\n  gpg --armor --export-secret-key joe@foo.bar -w0 | xclip -selection clipboard\n  ```\n\n- **Arch:**\n\n  ```shell\n  gpg --armor --export-secret-key joe@foo.bar | xclip -selection clipboard -i\n  ```\n\n- **FreeBSD (BSD base64):**\n\n  ```shell\n  gpg --armor --export-s[.github/workflows/update_semver.yml](.github/workflows/update_semver.yml)e your GPG passphrase.\n  ```\n\n#### 3. Update Workflow YAML\n\nModify your workflow YAML file to include the GPG private key and passphrase in the `gpg_private_key` and `gpg_passphrase` inputs:\n\n```yaml\nname: Create/update tag\non:\n  push:\n    branch: \"main\"\njobs:\n  create-tag:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n      - uses: rickstaa/action-create-tag@v1\n        id: \"tag_create\"\n        with:\n          tag: \"latest\"\n          tag_exists_error: false\n          message: \"Latest release\"\n          gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}\n          gpg_passphrase: ${{ secrets.PASSPHRASE }}\n\n      # Print result using the env variable.\n      - run: |\n        echo \"Tag already present: ${{ env.TAG_EXISTS }}\"\n\n      # Print result using the action output.\n      - run: |\n        echo \"Tag already present: ${{ steps.tag_create.outputs.tag_exists }}\"\n```\n\nThis workflow will now sign tags using the specified GPG key during tag creation.\n\n## Contributing\n\nFeel 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. :rocket: Please consult the [contribution guidelines](CONTRIBUTING.md) for more information.\n","funding_links":["https://github.com/sponsors/rickstaa"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickstaa%2Faction-create-tag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frickstaa%2Faction-create-tag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickstaa%2Faction-create-tag/lists"}