ci: disable container pushing during pull request builds
authorPetr Štetiar <ynezz@true.cz>
Sun, 14 May 2023 19:44:53 +0000 (21:44 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 15 May 2023 06:05:39 +0000 (08:05 +0200)
Seems like we need to find a different workflow for container
pre-testing.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
.github/workflows/build-push.yml

index d87a47d844bf54fe86a041100c3cf61a2282cb42..903c4b255e6f7f7015e8daf181db4e8f53ab9fe2 100644 (file)
@@ -65,12 +65,14 @@ jobs:
 
       - name: Docker meta
         id: meta
+        if: github.event_name != 'pull_request'
         uses: docker/metadata-action@v4
         with:
           images: name=ghcr.io/${{ github.repository }}/build${{ matrix.container_flavor }}-v${{ env.BUILDBOT_VERSION }}
 
       - name: Login to GitHub Container Registry
         uses: docker/login-action@v2
+        if: github.event_name != 'pull_request'
         with:
           registry: ghcr.io
           username: ${{ github.actor }}
@@ -78,6 +80,7 @@ jobs:
 
       - name: Build container again and push it
         uses: docker/build-push-action@v4
+        if: github.event_name != 'pull_request'
         with:
           push: true
           tags: ${{ steps.meta.outputs.tags }}