Closed Shaun-Harrison closed 2 years ago
Hello!
This may just be being an idiot, but I'd like to use the environment variable GITHUB_SHA as the tag for the image I'm trying to push
- name: Build Prod Container uses: RafikFarhad/push-to-gcr-github-action@v4.1 if: github.ref == 'refs/heads/main' with: gcloud_service_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} registry: gcr.io project_id: ${{ secrets.GCR_PROJECT }} image_name: ${{ secrets.GCR_NAME }} image_tag: main, $GITHUB_SHA dockerfile: ./hello-world/Dockerfile
But I get the following
Error parsing reference: "gcr.io/***/***:$GITHUB_SHA" is not a valid repository/tag: invalid reference format Pushing image gcr.io/***/***:$GITHUB_SHA... invalid reference format
Any suggestions on the correct syntax for this
I was being an idiot :D
Answer is
image_tag: main, ${{ github.sha }}
Hello!
This may just be being an idiot, but I'd like to use the environment variable GITHUB_SHA as the tag for the image I'm trying to push
But I get the following
Any suggestions on the correct syntax for this