1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: when backporting we don't want to push latest docker tag (#7961) (#7965)

Backporting fixes to old versions usually pushes the docker latest tag
as well. We only want to do this if the version we're releasing is the
latest
This commit is contained in:
Gastón Fournier 2024-08-22 12:14:25 +02:00 committed by GitHub
parent 545c577d90
commit 2d26c83ef3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -12,6 +12,11 @@ on:
description: "Which version to release" description: "Which version to release"
type: 'string' type: 'string'
required: true required: true
is-latest-version:
description: Is this the latest version? If latest we'll update the version docker
required: true
type: boolean
default: true
workflow_dispatch: workflow_dispatch:
jobs: jobs:
@ -39,6 +44,7 @@ jobs:
with: with:
images: | images: |
unleashorg/unleash-server unleashorg/unleash-server
flavor: latest=${{ github.event.inputs.is-latest-version }}
tags: | tags: |
# only enabled for workflow dispatch except main (assume its a release): # only enabled for workflow dispatch except main (assume its a release):
type=semver,pattern={{ version }},enable=${{ github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main' }},value=${{ inputs.version }} type=semver,pattern={{ version }},enable=${{ github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main' }},value=${{ inputs.version }}

View File

@ -18,8 +18,8 @@ on:
required: true required: true
type: boolean type: boolean
default: true default: true
update-version-function: is-latest-version:
description: Should we update the version function to use this version? description: Is this the latest version? If latest we'll update the version function, docker and npm latest
required: true required: true
type: boolean type: boolean
default: true default: true
@ -138,6 +138,7 @@ jobs:
secrets: inherit secrets: inherit
with: with:
version: ${{ github.event.inputs.version }} version: ${{ github.event.inputs.version }}
is-latest-version: ${{ github.event.inputs.is-latest-version == 'true' }}
publish-npm: publish-npm:
needs: build needs: build
@ -154,7 +155,7 @@ jobs:
update-version-checker: update-version-checker:
needs: publish-docker needs: publish-docker
if: ${{ github.event.inputs.update-version-function == 'true' }} if: ${{ github.event.inputs.is-latest-version == 'true' }}
uses: ./.github/workflows/update_version_for_version_checker.yml uses: ./.github/workflows/update_version_for_version_checker.yml
secrets: inherit secrets: inherit
with: with: