From e6b97bc9ef5f0bed714e7879873d02c58dc39de7 Mon Sep 17 00:00:00 2001 From: Alex Graf Date: Wed, 27 Mar 2024 16:05:33 +0100 Subject: [PATCH] update release action --- .github/actions/create-image/action.yaml | 7 +++++-- .github/workflows/dev-deploy.yml | 2 ++ .github/workflows/pre-release.yml | 6 ++++-- .github/workflows/release.yml | 2 ++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/actions/create-image/action.yaml b/.github/actions/create-image/action.yaml index dcf8957f..2a4917fa 100644 --- a/.github/actions/create-image/action.yaml +++ b/.github/actions/create-image/action.yaml @@ -7,6 +7,9 @@ inputs: VERSION: description: 'The version of the image' required: true + PREFIX: + description: 'The version prefix' + required: true TAG: description: 'The tag of the image' required: true @@ -39,13 +42,13 @@ runs: images: ${{ inputs.IMAGE_NAME }} labels: | org.opencontainers.image.created=${{ env.COMMITED_AT }} - org.opencontainers.image.version=${{ inputs.VERSION }} + org.opencontainers.image.version=${{ inputs.PREFIX }}${{ inputs.VERSION }} org.opencontainers.image.maintainer=EBP Schweiz AG flavor: | latest=${{ inputs.LATEST }} tags: | ${{ inputs.TAG }} - type=semver,pattern={{version}},value=${{ inputs.VERSION }} + ${{ inputs.PREFIX }}${{ inputs.VERSION }} - name: Log in to the GitHub container registry uses: docker/login-action@v3 diff --git a/.github/workflows/dev-deploy.yml b/.github/workflows/dev-deploy.yml index 32f3258f..fae14617 100644 --- a/.github/workflows/dev-deploy.yml +++ b/.github/workflows/dev-deploy.yml @@ -27,6 +27,7 @@ jobs: with: IMAGE_NAME: ${{ env.BASE_IMAGE_NAME }}-app VERSION: ${{ env.VERSION }} + PREFIX: e TAG: type=edge LATEST: false DOCKERFILE: ./apps/client-asset-sg/docker/Dockerfile @@ -37,6 +38,7 @@ jobs: with: IMAGE_NAME: ${{ env.BASE_IMAGE_NAME }}-api VERSION: ${{ env.VERSION }} + PREFIX: e TAG: type=edge LATEST: false DOCKERFILE: ./apps/server-asset-sg/docker/Dockerfile diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 713d8aaf..d0b840c6 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -24,7 +24,8 @@ jobs: with: IMAGE_NAME: ${{ env.BASE_IMAGE_NAME }}-app VERSION: ${{ env.VERSION }} - TAG: rc + PREFIX: rc + TAG: release-candidate LATEST: false DOCKERFILE: ./apps/client-asset-sg/docker/Dockerfile TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -34,7 +35,8 @@ jobs: with: IMAGE_NAME: ${{ env.BASE_IMAGE_NAME }}-api VERSION: ${{ env.VERSION }} - TAG: rc + PREFIX: rc + TAG: release-candidate LATEST: false DOCKERFILE: ./apps/server-asset-sg/docker/Dockerfile TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e14ab3e..fddf14a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,7 @@ jobs: with: IMAGE_NAME: ${{ env.BASE_IMAGE_NAME }}-app VERSION: ${{ env.TAG_NAME }} + PREFIX: v TAG: release LATEST: true DOCKERFILE: ./apps/client-asset-sg/docker/Dockerfile @@ -39,6 +40,7 @@ jobs: with: IMAGE_NAME: ${{ env.BASE_IMAGE_NAME }}-api VERSION: ${{ env.TAG_NAME }} + PREFIX: v TAG: release LATEST: true DOCKERFILE: ./apps/server-asset-sg/docker/Dockerfile