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
This commit is contained in:
Teodor Daskalov 2025-01-16 20:37:34 +02:00 committed by GitHub
parent ab3f41ad80
commit a10867434d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,9 +27,10 @@ permissions:
jobs: jobs:
build-and-push: 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 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -93,7 +94,9 @@ jobs:
docker push "${FULL_ECR_URL}:${NEW_TAG}" docker push "${FULL_ECR_URL}:${NEW_TAG}"
- name: Create new tag and notify PR - 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: | run: |
git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com" git config user.email "github-actions[bot]@users.noreply.github.com"