https://github.com/jacobsvante/gcr-add-version-tags-action
https://github.com/jacobsvante/gcr-add-version-tags-action
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jacobsvante/gcr-add-version-tags-action
- Owner: jacobsvante
- License: mit
- Created: 2022-01-05T14:36:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-05T14:49:46.000Z (over 4 years ago)
- Last Synced: 2025-03-13T18:03:44.682Z (about 1 year ago)
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
GitHub action for adding Docker image tags to Google Container Registry, based on version identifiers.
Please note that `gcloud` CLI must've been set up in a previous step. There's a dedicated action for that, found here: https://github.com/google-github-actions/setup-gcloud
Example, used together with the excellent [release-please-action](https://github.com/google-github-actions/release-please-action):
```yml
on:
push:
branches:
- main
name: Main
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v2
id: release
with:
release-type: simple
package-name: my-package
bump-minor-pre-major: true
- uses: actions/checkout@v2
- name: Tag major and minor versions
if: ${{ steps.release.outputs.release_created }}
uses: jacobsvante/gcr-add-version-tags-action@v0
with:
repository: eu.gcr.io/project-123456/my-package
source-tag: ${{ github.sha }} # Must already exist in GCR repository
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}
patch: ${{ steps.release.outputs.patch }}
push-latest: true # If you want to also push an updated `latest` tag
```