From 4c231e4a010272d8a236a0a0cb495bb59a9a3c0f Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Wed, 22 Feb 2023 15:05:48 +0100 Subject: [PATCH] trigger github actions jobs on merge_group event (#1346) Get the repo ready to support the [pull request merge queue](https://github.blog/changelog/2021-10-27-pull-request-merge-queue-limited-beta/): Screenshot 2023-02-20 at 14 48 44 --- .github/workflows/ci.yml | 4 ++++ .github/workflows/snyk.yml | 12 ++++++++---- .github/workflows/verify-changelog-updated.yml | 4 ++++ .github/workflows/verify-public-docs-updated.yml | 4 ++++ 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29f34083..8d3d6d06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ on: - main - dev pull_request: + # You can use the merge_group event to trigger your GitHub Actions workflow when + # a pull request is added to a merge queue + # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#triggering-merge-group-checks-with-github-actions + merge_group: jobs: lint: diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index 54a7f9d7..086cba96 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -2,9 +2,13 @@ name: snyk on: push: - branches: [ main,dev ] + branches: [main, dev] pull_request: - branches: [ main,dev ] + branches: [main, dev] + # You can use the merge_group event to trigger your GitHub Actions workflow when + # a pull request is added to a merge queue + # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#triggering-merge-group-checks-with-github-actions + merge_group: jobs: security-scan: @@ -13,7 +17,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: "3.9" - uses: actions/setup-node@v3 with: node-version: 14.17.0 @@ -27,4 +31,4 @@ jobs: continue-on-error: true run: snyk test --all-projects --severity-threshold=high env: - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} \ No newline at end of file + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} diff --git a/.github/workflows/verify-changelog-updated.yml b/.github/workflows/verify-changelog-updated.yml index 3b92afc6..73e85836 100644 --- a/.github/workflows/verify-changelog-updated.yml +++ b/.github/workflows/verify-changelog-updated.yml @@ -6,6 +6,10 @@ on: branches: - main - dev + # You can use the merge_group event to trigger your GitHub Actions workflow when + # a pull request is added to a merge queue + # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#triggering-merge-group-checks-with-github-actions + merge_group: jobs: verfiy-changelog-updated: diff --git a/.github/workflows/verify-public-docs-updated.yml b/.github/workflows/verify-public-docs-updated.yml index 63a5f865..2bfe148f 100644 --- a/.github/workflows/verify-public-docs-updated.yml +++ b/.github/workflows/verify-public-docs-updated.yml @@ -6,6 +6,10 @@ on: branches: - main - dev + # You can use the merge_group event to trigger your GitHub Actions workflow when + # a pull request is added to a merge queue + # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#triggering-merge-group-checks-with-github-actions + merge_group: jobs: verify-public-docs-updated: