Change image push conditions
Image should be pushed due to master merge or
manual dispatch, just like we do in other client
workflows.
@@ -34,8 +34,6 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-relay-
- - run: sudo df -h
-
- name: Build Docker Build Image
uses: docker/build-push-action@v2
with:
@@ -55,7 +53,9 @@ jobs:
- name: Login to Google Container Registry
if: |
- startsWith(github.ref, 'refs/heads/releases/')
+ github.ref == 'refs/heads/master'
+ && (github.event_name == 'push'
+ || github.event_name == 'workflow_dispatch')
uses: docker/login-action@v1
with:
registry: ${{ secrets.GCR_REGISTRY_URL }}
@@ -77,4 +77,6 @@ jobs:
build-args: |
REVISION=${{ github.sha }}
push: |
- ${{ startsWith(github.ref, 'refs/heads/releases/') }}
\ No newline at end of file
+ ${{ github.ref == 'refs/heads/master'
+ && (github.event_name == 'push'
+ || github.event_name == 'workflow_dispatch') }}
\ No newline at end of file
