[buildbot] ci: move git short sha length to ENV

LEDE Commits lede-commits at lists.infradead.org
Thu Nov 16 03:48:27 PST 2023


ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/7a5c3c334abbfd2c606142116624097c814a05d8

commit 7a5c3c334abbfd2c606142116624097c814a05d8
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Tue Nov 14 14:47:26 2023 +0100

    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 <ansuelsmth at gmail.com>
---
 .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 at v4




More information about the lede-commits mailing list