From a10867434d02b27cd4ae3921e06b188f3eab18ea Mon Sep 17 00:00:00 2001 From: Teodor Daskalov Date: Thu, 16 Jan 2025 20:37:34 +0200 Subject: [PATCH] Test PR with 'CI: Build' label (#4) * uncomment 'CI:Build' label contition * test commit * modify condition to always create a new tag if merged PR with label * modify condition to run on manual trigger as well --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e4d70ddaa8..1b6533fbaf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,9 +27,10 @@ permissions: jobs: build-and-push: - # if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'CI:Build') + if: > + github.event_name == 'workflow_dispatch' || + (github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'CI:Build')) runs-on: ubuntu-22.04 - steps: - name: Checkout Code uses: actions/checkout@v4 @@ -93,7 +94,9 @@ jobs: docker push "${FULL_ECR_URL}:${NEW_TAG}" - name: Create new tag and notify PR - if: ${{ inputs.create_tag }} + if: > + inputs.create_tag == true || + (github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'CI:Build')) run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com"