From be5bcf8faa7b11df099a1d6fed285ec0d268c76e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Tue, 29 Oct 2024 17:41:17 +0100 Subject: [PATCH] refactor: no need to tag OCELOT_VERSION Now we have the version in a file, it's not necessary to encode it in the docker tag. --- .github/workflows/publish.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ec666fa..3e1e651 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,21 +32,21 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Read $OCELOT_VERSION from file - run: cat .env >> $GITHUB_ENV - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@70b2cdc6480c1a8b86edf1777157f8f437de2166 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=schedule,prefix=ocelot-${{ env.OCELOT_VERSION }}--branded- - type=semver,pattern={{version}},prefix=ocelot-${{ env.OCELOT_VERSION }}--branded- - type=semver,pattern={{major}}.{{minor}},prefix=ocelot-${{ env.OCELOT_VERSION }}--branded- - type=semver,pattern={{major}},prefix=ocelot-${{ env.OCELOT_VERSION }}--branded- - type=ref,event=branch,prefix=ocelot-${{ env.OCELOT_VERSION }}--branded- - type=ref,event=pr,prefix=ocelot-${{ env.OCELOT_VERSION }}--branded- - type=sha,prefix=ocelot-${{ env.OCELOT_VERSION }}--branded-sha- + type=schedule + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=ref,event=branch + type=ref,event=pr + type=sha + - name: Read $OCELOT_VERSION from file + run: cat .env >> $GITHUB_ENV - name: Build and push Docker images id: push uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75