From 102963b3c7aca9ab3b7f02cedb1302045bfdd064 Mon Sep 17 00:00:00 2001 From: Yash Bagarka Date: Wed, 8 Nov 2023 15:17:20 +0000 Subject: [PATCH] branch name as a variable Signed-off-by: Yash Bagarka --- .github/workflows/publish.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2ff6b4ea8ebce..8be5c20debe36 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,6 +7,8 @@ on: push: branches: - "eve-kernel-amd64-v6.1.38-generic" +env: + branch_name: "refs/heads/eve-kernel-amd64-v6.1.38-generic" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -27,13 +29,13 @@ jobs: make -f Makefile.eve BRANCH?=${GITHUB_REF##*/} kernel-gcc - name: Log in to Docker Hub - if: github.ref == 'refs/heads/eve-kernel-amd64-v6.1.38-generic' + if: ${{ github.ref == env.branch_name }} uses: docker/login-action@v3 with: username: ${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }} password: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }} - name: Push eve-kernel-amd64-v6.1.38-generic if PR approved or pushed - if: github.ref == 'refs/heads/eve-kernel-amd64-v6.1.38-generic' + if: ${{ github.ref == env.branch_name }} run: | make -f Makefile.eve BRANCH?=${GITHUB_REF##*/} push-gcc