From 396c227e7dd7b07431d78ed1b08941c3856bafa5 Mon Sep 17 00:00:00 2001 From: Pablo Molina Date: Fri, 9 Feb 2024 18:22:52 -0500 Subject: [PATCH 1/3] Trigger validation and tests in every commit and cosecutive commit --- .github/workflows/validate-and-generate-transactional.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-and-generate-transactional.yml b/.github/workflows/validate-and-generate-transactional.yml index 597b38e..95e24cd 100644 --- a/.github/workflows/validate-and-generate-transactional.yml +++ b/.github/workflows/validate-and-generate-transactional.yml @@ -2,7 +2,8 @@ name: Validate and Generate Transactional Client Libraries on: pull_request: - types: [ labeled ] + types: [assigned, opened, synchronize, reopened] + push: jobs: validate: From f97acd6fe8e4e76b8a5f7ff669c3687af42e7242 Mon Sep 17 00:00:00 2001 From: Pablo Molina Date: Fri, 9 Feb 2024 18:24:49 -0500 Subject: [PATCH 2/3] Adding event trigger to PR --- .github/workflows/validate-and-generate-transactional.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-and-generate-transactional.yml b/.github/workflows/validate-and-generate-transactional.yml index 95e24cd..2b43a26 100644 --- a/.github/workflows/validate-and-generate-transactional.yml +++ b/.github/workflows/validate-and-generate-transactional.yml @@ -2,7 +2,7 @@ name: Validate and Generate Transactional Client Libraries on: pull_request: - types: [assigned, opened, synchronize, reopened] + types: [assigned, opened, synchronize, reopened, labeled] push: jobs: From 699653919e7ecbeed0f053c227174c4afcb3a988 Mon Sep 17 00:00:00 2001 From: Pablo Molina Date: Fri, 9 Feb 2024 18:36:56 -0500 Subject: [PATCH 3/3] Testing PR workflow trigger --- .../validate-and-generate-transactional.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/validate-and-generate-transactional.yml b/.github/workflows/validate-and-generate-transactional.yml index 2b43a26..099f057 100644 --- a/.github/workflows/validate-and-generate-transactional.yml +++ b/.github/workflows/validate-and-generate-transactional.yml @@ -2,12 +2,12 @@ name: Validate and Generate Transactional Client Libraries on: pull_request: - types: [assigned, opened, synchronize, reopened, labeled] + types: [ assigned, opened, synchronize, reopened, labeled ] push: jobs: validate: - if: ${{ github.event.label.name == 'test-transactional' }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'test-transactional') }} runs-on: ubuntu-latest outputs: version: ${{ steps.set-version.outputs.version }} @@ -33,7 +33,7 @@ jobs: run: node utils/actions/setVersionVar.js --api=transactional setup-cache: - if: ${{ github.event.label.name == 'test-transactional' }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'test-transactional') }} runs-on: ubuntu-latest needs: [validate] steps: @@ -52,7 +52,7 @@ jobs: java -jar .cache/swagger-codegen-cli.jar help generate-node: - if: ${{ github.event.label.name == 'test-transactional' }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'test-transactional') }} runs-on: ubuntu-latest needs: [validate, setup-cache] steps: @@ -107,7 +107,7 @@ jobs: path: swagger-out/transactional-node/mailchimp-transactional-node.zip generate-php: - if: ${{ github.event.label.name == 'test-transactional' }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'test-transactional') }} runs-on: ubuntu-latest needs: [validate, setup-cache] @@ -151,7 +151,7 @@ jobs: path: swagger-out/transactional-php/mailchimp-transactional-php.zip generate-ruby: - if: ${{ github.event.label.name == 'test-transactional' }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'test-transactional') }} runs-on: ubuntu-latest needs: [validate, setup-cache] steps: @@ -195,7 +195,7 @@ jobs: path: swagger-out/transactional-ruby/mailchimp-transactional-ruby.zip generate-python: - if: ${{ github.event.label.name == 'test-transactional' }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'test-transactional') }} runs-on: ubuntu-latest needs: [validate, setup-cache] steps: