From 885b381643efba70b256298aade63c4a559c6ae8 Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 09:30:32 -0500 Subject: [PATCH] more attempts --- .github/workflows/bsod-api-container.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index f4ee1fd..92eeddb 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -36,7 +36,7 @@ jobs: - name: Build and push run: | - $SHORT_SHA = "${{ github.sha }}"[0..6] -join '' + $SHA = "${{ github.sha }}"[0..6] -join '' if ("${{ github.ref }}" -eq 'refs/heads/main') { $TAG = 'latest' @@ -45,12 +45,14 @@ jobs: } Write-Host "Using tag: $TAG" + Write-Host "Using SHA: $SHA" + docker build -t ` ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG ` - -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }} ` + -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$SHA ` api/ docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG - docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }} + docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$SHA - name: Log out from the Container registry run: docker logout ${{ env.REGISTRY }}