[buildbot] ci: disable container pushing during pull request builds

LEDE Commits lede-commits at lists.infradead.org
Mon May 15 08:38:45 PDT 2023


ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/28226f1b5a947d99ff395e35b3afceab0a388d28

commit 28226f1b5a947d99ff395e35b3afceab0a388d28
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Sun May 14 21:44:53 2023 +0200

    ci: disable container pushing during pull request builds
    
    Seems like we need to find a different workflow for container
    pre-testing.
    
    Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 .github/workflows/build-push.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml
index d87a47d..903c4b2 100644
--- a/.github/workflows/build-push.yml
+++ b/.github/workflows/build-push.yml
@@ -65,12 +65,14 @@ jobs:
 
       - name: Docker meta
         id: meta
+        if: github.event_name != 'pull_request'
         uses: docker/metadata-action at 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 at 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 at v4
+        if: github.event_name != 'pull_request'
         with:
           push: true
           tags: ${{ steps.meta.outputs.tags }}




More information about the lede-commits mailing list