From 11710a56dcd24330ffc8ca9066263a665e17a013 Mon Sep 17 00:00:00 2001 From: Benjamin Harder Date: Mon, 19 Feb 2024 00:52:37 +0100 Subject: [PATCH] fixing commit ids.. once again --- .github/workflows/dev.yml | 2 +- .github/workflows/main.yml | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index c7ed4ec..27f891e 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -64,7 +64,7 @@ jobs: --label com.decluttarr.version=$IMAGE_TAG \ --label com.decluttarr.commit=$SHORT_COMMIT_ID \ --build-arg IMAGE_TAG=$IMAGE_TAG \ - --build-arg SHORT_COMMIT_ID=$COMMIT_SHORT_SHA \ + --build-arg SHORT_COMMIT_ID=$SHORT_COMMIT_ID \ -f docker/Dockerfile \ --push . diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93dfd16..f2176b3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,11 +42,16 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} WITH_V: true + - name: Store short Commit ID in env variable + id: vars + run: | + calculatedSha=$(git rev-parse --short ${{ github.sha }}) + echo "SHORT_COMMIT_ID=$calculatedSha" >> $GITHUB_ENV + - name: "Build, Tag, and push the Docker image" env: IMAGE_NAME: ghcr.io/manimatter/decluttarr IMAGE_TAG: ${{ steps.setversion.outputs.new_tag }} - SHORT_COMMIT_ID: ${{ github.sha_short }} run: | docker buildx build \ --platform linux/amd64,linux/arm64 \