From 37ef468b5f5e191d9837d261e69d5226fa4ec275 Mon Sep 17 00:00:00 2001 From: Lukas Metzner Date: Sun, 26 May 2024 19:33:51 +0200 Subject: [PATCH] GITHUB_REF_NAME --- .github/workflows/docker-image.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 951fb8b..cbc7758 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -23,9 +23,15 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract branch name + id: extract_branch + run: echo "BRANCH_NAME=${GITHUB_REF_NAME}" >> $GITHUB_ENV + - name: Build and push Docker image uses: docker/build-push-action@v5.3.0 with: context: . push: true - tags: ghcr.io/lukasmetzner/podprox:${GITHUB_REF_NAME} + tags: | + ghcr.io/lukasmetzner/podprox:latest + ghcr.io/lukasmetzner/podprox:${{ env.BRANCH_NAME }}