From 6d66f1e9e7b6b778c4849b75840b371f4f6169f8 Mon Sep 17 00:00:00 2001 From: David Siaw Date: Wed, 29 May 2024 21:00:42 +0900 Subject: [PATCH] fix branchane, --- .github/workflows/docker-branch-build.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-branch-build.yml b/.github/workflows/docker-branch-build.yml index 7001d089..7c4757dc 100644 --- a/.github/workflows/docker-branch-build.yml +++ b/.github/workflows/docker-branch-build.yml @@ -4,16 +4,19 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - - name: Login to Docker Hub + - name: extract_branch + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch + - name: Login to Docker Hub uses: docker/login-action@v3 with: username: degicadev password: ${{ secrets.DOCKERHUB_PAT }} - name: setup run: |- - docker build . -t degicadev/kaiser:branch-${{ github.head_ref }} - docker push degicadev/kaiser:branch-${{ github.head_ref }} + docker build . -t degicadev/kaiser:branch-${{ steps.extract_branch.outputs.branch }} + docker push degicadev/kaiser:branch-${{ steps.extract_branch.outputs.branch }} 'on': push: