build-containers: determine latest release tag and push that as latest (#47742)
This commit is contained in:
parent
8957ef0df5
commit
f1faf31735
7
.github/workflows/build-containers.yml
vendored
7
.github/workflows/build-containers.yml
vendored
@ -57,6 +57,12 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
|
|
||||||
|
- name: Determine latest release tag
|
||||||
|
id: latest
|
||||||
|
run: |
|
||||||
|
git fetch --quiet --tags
|
||||||
|
echo "tag=$(git tag --list --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)" | tee -a $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
|
- uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
with:
|
with:
|
||||||
@ -71,6 +77,7 @@ jobs:
|
|||||||
type=semver,pattern={{major}}
|
type=semver,pattern={{major}}
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
|
type=raw,value=latest,enable=${{ github.ref == format('refs/tags/{0}', steps.latest.outputs.tag) }}
|
||||||
|
|
||||||
- name: Generate the Dockerfile
|
- name: Generate the Dockerfile
|
||||||
env:
|
env:
|
||||||
|
Loading…
Reference in New Issue
Block a user