From a71ca05bd40cb21c25b9f3993ad0cbe7ebbeb51a Mon Sep 17 00:00:00 2001 From: Jonas Gaffke Date: Sat, 25 May 2024 17:17:06 +0200 Subject: [PATCH] build.yml: only build on push to main branch --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1baaf40..d0ed07a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,9 @@ name: Build and Push to GitHub Container Registry with buildah -on: [push, workflow_dispatch] +on: + push: + branches: + - main + workflow_dispatch: jobs: build: name: Build and push image @@ -23,4 +27,4 @@ jobs: username: fsr password: ${{ secrets.REGISTRY_PASSWORD }} - name: Print the image url - run: echo "Image pushed to ${{ steps.push.outputs.registry-paths }}" \ No newline at end of file + run: echo "Image pushed to ${{ steps.push.outputs.registry-paths }}"