From 634c8fb7e4e36e4acef175fa007c0572a533df01 Mon Sep 17 00:00:00 2001 From: Knifa Date: Fri, 29 Nov 2024 10:30:16 +0000 Subject: [PATCH] wip --- .github/workflows/build.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 63fe0fd..9566b89 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,7 +3,7 @@ name: build on: push: branches: docker-test - tags: v* + tags: release/v* concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -25,13 +25,16 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set Docker tag + id: tag + run: | + if [[ $GITHUB_REF == refs/tags/* ]]; then + echo "tag=${GITHUB_REF_NAME/release/}" + else + echo "tag=edge" + fi >> $GITHUB_OUTPUT - name: Build and push uses: docker/build-push-action@v6 with: push: true - tags: | - {{ if startsWith(github.ref, 'refs/tags/') }} - ghcr.io/${{ github.repository }}:{{ github.ref_name }} - {{ else }} - ghcr.io/${{ github.repository }}:edge - {{ end }} + tags: ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.tag }}