v0.13.0 #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Latest updates the :latest tag for the quay.io/tinkerbell/hegel image to the latest release. | |
# The latest release is controlled by maintainers as defined by Github's 'latest release' flag | |
# on releases and can be generally defined as the latest major.minor.patch. | |
# | |
# Given this workflow is triggered when a release is published or edited, it is susceptible | |
# to being overtriggered. The workflow operates on the assumption that a published release has | |
# an associated docker image. | |
name: Latest | |
on: | |
workflow_dispatch: {} | |
release: | |
types: [published, edited] | |
env: | |
REGISTRY: quay.io | |
IMAGE: quay.io/${{ github.repository }} | |
jobs: | |
latest: | |
name: Update latest image tag | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to quay.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- uses: docker/setup-buildx-action@v3 | |
- name: Tag and push | |
run: | | |
LATEST_RELEASE=$(curl -H "Accept: application/json" https://api.github.com/repos/tinkerbell/hegel/releases/latest | jq .name -r) | |
docker buildx imagetools create --tag ${{ env.IMAGE }}:latest ${{ env.IMAGE }}:$LATEST_RELEASE |