feat(ci): pass BRANCH to Makefile for correct build tag

This commit is contained in:
yusing
2026-01-22 16:16:03 +08:00
parent 082991694b
commit 280e455198
2 changed files with 9 additions and 0 deletions

View File

@@ -66,6 +66,11 @@ jobs:
version="v$(date -u +'%Y%m%d-%H%M')"
fi
echo "VERSION_FOR_BUILD=$version" >> $GITHUB_ENV
if [ "${GITHUB_REF_TYPE}" = "branch" ]; then
echo "BRANCH_FOR_BUILD=${GITHUB_REF_NAME}" >> $GITHUB_ENV
else
echo "BRANCH_FOR_BUILD=" >> $GITHUB_ENV
fi
- name: Docker meta
id: meta
@@ -105,6 +110,7 @@ jobs:
build-args: |
VERSION=${{ env.VERSION_FOR_BUILD }}
MAKE_ARGS=${{ env.MAKE_ARGS }}
BRANCH=${{ env.BRANCH_FOR_BUILD }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1