From e4b34811b589a4c6691b8241c5331a1658645144 Mon Sep 17 00:00:00 2001 From: Luc DUZAN Date: Wed, 14 Feb 2024 14:47:39 +0100 Subject: [PATCH] Push only on main --- .github/workflows/build-docker.yml | 7 ++++++- .github/workflows/ci.yml | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index eb71b74..8398dda 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -12,6 +12,11 @@ on: type: boolean description: (bool) Whether this is a release or not default: false + push: + required: false + type: boolean + description: (bool) Whether we should push the image or not + default: true env: NAMESPACE: "conduktor" LABEL_IMAGE_AUTHORS: "Conduktor " @@ -67,7 +72,7 @@ jobs: with: context: . platforms: linux/amd64,linux/arm64 - push: true + push: &{{ inputs.push }} file: docker/Dockerfile tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b488410..81fc48a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,7 @@ on: + push: + branches: + - main pull_request: types: [opened, reopened, synchronize, labeled] jobs: @@ -24,6 +27,7 @@ jobs: needs: [unit-test, integration-test] with: release: false + push: github.ref_name == 'main' image_tags: | type=sha type=ref,event=branch