From 7a5c3c334abbfd2c606142116624097c814a05d8 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Tue, 14 Nov 2023 14:47:26 +0100 Subject: [PATCH] ci: move git short sha length to ENV Move git short sha length to ENV to make it easier to configure in the future if needed. Signed-off-by: Christian Marangi --- .github/workflows/build-push.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 89d57e3..f4e4259 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -9,6 +9,7 @@ on: env: BUILDBOT_VERSION: 3.8.0 + GITHUB_SHA_LEN: 8 concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -63,7 +64,7 @@ jobs: - name: Environment variables run: | - echo "GIT_SHA_SHORT=${GITHUB_SHA::8}" >> $GITHUB_ENV + echo "GIT_SHA_SHORT=${GITHUB_SHA::${{ env.GITHUB_SHA_LEN }}}" >> $GITHUB_ENV - name: Build container and export it to local Docker uses: docker/build-push-action@v4 -- 2.30.2