Modify conditions for logging to the GCR
Conditions must be aligned with the conditions for pushing images to the
GCR.
@@ -74,9 +74,7 @@ jobs:
gotestsum
- name: Login to Google Container Registry
- if: |
- github.ref == 'refs/heads/main'
- && github.event_name != 'pull_request'
+ if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ${{ env.GCR_REGISTRY_URL }}
@@ -94,8 +92,7 @@ jobs:
# We don't use TAG yet.
tags: ${{ env.GCR_REGISTRY_URL }}/${{ env.GOOGLE_PROJECT_ID }}/${{ env.IMAGE_NAME }}
labels: revision=${{ github.sha }}
- build-args: |
- REVISION=${{ github.sha }}
+ build-args: REVISION=${{ github.sha }}
push: ${{ github.event_name != 'pull_request' }}
- # Temp fix - move cache instead of copying (added below step and
@@ -133,6 +130,7 @@ jobs:
${{ runner.os }}-buildx-
- name: Login to Google Container Registry
+ if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ${{ env.GCR_REGISTRY_URL }}
@@ -149,8 +147,7 @@ jobs:
# HOSTNAME/PROJECT-ID/IMAGE:TAG
# We don't use TAG yet, will be added at later stages of work on RFC-18.
tags: ${{ env.GCR_REGISTRY_URL }}/${{ env.GOOGLE_PROJECT_ID }}/${{ env.IMAGE_NAME }}
- labels: |
- revision=${{ github.sha }}
+ labels: revision=${{ github.sha }}
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
