From 5fa18e173a533943f98ad0cebafa9790fa8dd534 Mon Sep 17 00:00:00 2001 From: chris48s Date: Wed, 9 Feb 2022 18:40:56 +0000 Subject: [PATCH] fix docker image user agent (#7582) --- .github/workflows/build-docker-image.yml | 5 ++++- .github/workflows/publish-docker-next.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 820b6b5668..18d03c86e1 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -12,6 +12,9 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Set Git Short SHA + run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV + - name: Build uses: docker/build-push-action@v2 with: @@ -19,4 +22,4 @@ jobs: push: false tags: shieldsio/shields:pr-validation build-args: | - version=${GITHUB_SHA::7} + version=${{ env.SHORT_SHA }} diff --git a/.github/workflows/publish-docker-next.yml b/.github/workflows/publish-docker-next.yml index 905779557f..63cff6af86 100644 --- a/.github/workflows/publish-docker-next.yml +++ b/.github/workflows/publish-docker-next.yml @@ -20,6 +20,9 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set Git Short SHA + run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV + - name: Build and push uses: docker/build-push-action@v2 with: @@ -27,4 +30,4 @@ jobs: push: true tags: shieldsio/shields:next build-args: | - version=${GITHUB_SHA::7} + version=${{ env.SHORT_SHA }}