From 22dbe1c1c48f82a266ffa8f2f95152d83e75f838 Mon Sep 17 00:00:00 2001 From: RogerLamTd Date: Mon, 18 Nov 2024 12:16:54 +0700 Subject: [PATCH 1/4] chore(repo): ignore docs changes in workflows --- .github/workflows/ci-lint.yml | 2 ++ .github/workflows/ci-provers.yml | 2 ++ .github/workflows/ci-risc0.yml | 2 ++ .github/workflows/ci-sgx-all.yml | 2 ++ .github/workflows/ci-sgx-docker.yml | 2 ++ .github/workflows/ci-sp1.yml | 2 ++ 6 files changed, 12 insertions(+) diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index c42d8363e..f4fb714ff 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -3,6 +3,8 @@ name: CI - Lint on: pull_request: types: [opened, reopened, edited, synchronize] + paths-ignore: + - "docs/**" merge_group: env: diff --git a/.github/workflows/ci-provers.yml b/.github/workflows/ci-provers.yml index 16dd7cb1c..4ea617323 100644 --- a/.github/workflows/ci-provers.yml +++ b/.github/workflows/ci-provers.yml @@ -7,10 +7,12 @@ on: paths: - "pipelines/**" - "harness/**" + - "!docs/**" pull_request: paths: - "pipelines/**" - "harness/**" + - "!docs/**" merge_group: env: diff --git a/.github/workflows/ci-risc0.yml b/.github/workflows/ci-risc0.yml index 3fd4cb08a..d2e543661 100644 --- a/.github/workflows/ci-risc0.yml +++ b/.github/workflows/ci-risc0.yml @@ -6,9 +6,11 @@ on: branches: ["main"] paths: - "provers/risc0/**" + - "!docs/**" pull_request: paths: - "provers/risc0/**" + - "!docs/**" merge_group: jobs: diff --git a/.github/workflows/ci-sgx-all.yml b/.github/workflows/ci-sgx-all.yml index 9a020125c..7ab23f7be 100644 --- a/.github/workflows/ci-sgx-all.yml +++ b/.github/workflows/ci-sgx-all.yml @@ -6,9 +6,11 @@ on: branches: ["main"] paths: - "provers/sgx/**" + - "!docs/**" pull_request: paths: - "provers/sgx/**" + - "!docs/**" merge_group: jobs: diff --git a/.github/workflows/ci-sgx-docker.yml b/.github/workflows/ci-sgx-docker.yml index 15335598f..0e0454eb6 100644 --- a/.github/workflows/ci-sgx-docker.yml +++ b/.github/workflows/ci-sgx-docker.yml @@ -6,9 +6,11 @@ on: branches: ["main"] paths: - "docker/**" + - "!docs/**" pull_request: paths: - "docker/**" + - "!docs/**" merge_group: jobs: diff --git a/.github/workflows/ci-sp1.yml b/.github/workflows/ci-sp1.yml index 1e7adbf66..9718773e6 100644 --- a/.github/workflows/ci-sp1.yml +++ b/.github/workflows/ci-sp1.yml @@ -6,9 +6,11 @@ on: branches: ["main"] paths: - "provers/sp1/**" + - "!docs/**" pull_request: paths: - "provers/sp1/**" + - "!docs/**" merge_group: jobs: From 43f6d809d30ac90aaee54edd63a131bb2b392e8a Mon Sep 17 00:00:00 2001 From: RogerLamTd Date: Mon, 18 Nov 2024 13:14:33 +0700 Subject: [PATCH 2/4] . --- .github/workflows/ci-lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index f4fb714ff..7322976d0 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -3,8 +3,8 @@ name: CI - Lint on: pull_request: types: [opened, reopened, edited, synchronize] - paths-ignore: - - "docs/**" + paths: + - "!docs/**" merge_group: env: From cfb4f63022a7f1c9cb1403b19eb935a89d37a1e8 Mon Sep 17 00:00:00 2001 From: RogerLamTd Date: Mon, 18 Nov 2024 13:15:19 +0700 Subject: [PATCH 3/4] . --- .github/workflows/openapi-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/openapi-deploy.yml b/.github/workflows/openapi-deploy.yml index 2e01cea6e..2294de41d 100644 --- a/.github/workflows/openapi-deploy.yml +++ b/.github/workflows/openapi-deploy.yml @@ -3,8 +3,8 @@ name: OpenAPI on: push: branches: ["main"] - paths-ignore: - - "docs/**" + paths: + - "!docs/**" pull_request: merge_group: From 6cb5522fdbaf5c92d317f8d22b96dda55643afe2 Mon Sep 17 00:00:00 2001 From: RogerLamTd Date: Tue, 19 Nov 2024 11:07:56 +0700 Subject: [PATCH 4/4] chore(repo): remove workflows from merge_group so they don't trigger every time a PR gets merged to main, add merge-gatekeeper --- .github/workflows/ci-all.yml | 1 - .github/workflows/ci-lint.yml | 1 - .github/workflows/ci-provers.yml | 1 - .github/workflows/ci-risc0.yml | 1 - .github/workflows/ci-sgx-all.yml | 1 - .github/workflows/ci-sgx-docker.yml | 1 - .github/workflows/ci-sp1.yml | 1 - .github/workflows/openapi-deploy.yml | 3 ++- .github/workflows/repo--merge-gatekeeper.yml | 21 +++++++++++++++++++ ...se-please.yml => repo--release-please.yml} | 0 .../{typo-check.yml => repo--typo-check.yml} | 0 ...-title.yml => repo--validate-pr-title.yml} | 0 12 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/repo--merge-gatekeeper.yml rename .github/workflows/{release-please.yml => repo--release-please.yml} (100%) rename .github/workflows/{typo-check.yml => repo--typo-check.yml} (100%) rename .github/workflows/{validate-pr-title.yml => repo--validate-pr-title.yml} (100%) diff --git a/.github/workflows/ci-all.yml b/.github/workflows/ci-all.yml index 0a1130276..c52c5bf3b 100644 --- a/.github/workflows/ci-all.yml +++ b/.github/workflows/ci-all.yml @@ -14,7 +14,6 @@ on: - "lib/**" - "script/**" - "!docs/**" - merge_group: env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index 7322976d0..8cdaa66a6 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -5,7 +5,6 @@ on: types: [opened, reopened, edited, synchronize] paths: - "!docs/**" - merge_group: env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/ci-provers.yml b/.github/workflows/ci-provers.yml index 4ea617323..ca09162aa 100644 --- a/.github/workflows/ci-provers.yml +++ b/.github/workflows/ci-provers.yml @@ -13,7 +13,6 @@ on: - "pipelines/**" - "harness/**" - "!docs/**" - merge_group: env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/ci-risc0.yml b/.github/workflows/ci-risc0.yml index d2e543661..792707fa0 100644 --- a/.github/workflows/ci-risc0.yml +++ b/.github/workflows/ci-risc0.yml @@ -11,7 +11,6 @@ on: paths: - "provers/risc0/**" - "!docs/**" - merge_group: jobs: build-test-risc0: diff --git a/.github/workflows/ci-sgx-all.yml b/.github/workflows/ci-sgx-all.yml index 7ab23f7be..d6879a8e2 100644 --- a/.github/workflows/ci-sgx-all.yml +++ b/.github/workflows/ci-sgx-all.yml @@ -11,7 +11,6 @@ on: paths: - "provers/sgx/**" - "!docs/**" - merge_group: jobs: build-test-sgx: diff --git a/.github/workflows/ci-sgx-docker.yml b/.github/workflows/ci-sgx-docker.yml index 0e0454eb6..9050bd3d3 100644 --- a/.github/workflows/ci-sgx-docker.yml +++ b/.github/workflows/ci-sgx-docker.yml @@ -11,7 +11,6 @@ on: paths: - "docker/**" - "!docs/**" - merge_group: jobs: build-test-sgx-with-docker: diff --git a/.github/workflows/ci-sp1.yml b/.github/workflows/ci-sp1.yml index 9718773e6..127e8a088 100644 --- a/.github/workflows/ci-sp1.yml +++ b/.github/workflows/ci-sp1.yml @@ -11,7 +11,6 @@ on: paths: - "provers/sp1/**" - "!docs/**" - merge_group: jobs: build-test-sp1: diff --git a/.github/workflows/openapi-deploy.yml b/.github/workflows/openapi-deploy.yml index 2294de41d..e1e57b187 100644 --- a/.github/workflows/openapi-deploy.yml +++ b/.github/workflows/openapi-deploy.yml @@ -6,7 +6,8 @@ on: paths: - "!docs/**" pull_request: - merge_group: + paths: + - "!docs/**" permissions: contents: read diff --git a/.github/workflows/repo--merge-gatekeeper.yml b/.github/workflows/repo--merge-gatekeeper.yml new file mode 100644 index 000000000..795a81aa7 --- /dev/null +++ b/.github/workflows/repo--merge-gatekeeper.yml @@ -0,0 +1,21 @@ +name: Merge Gatekeeper + +on: + pull_request: + branches: + - main + merge_group: # Trigger in merge queue to pass the required status check + +jobs: + merge-gatekeeper: + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }} + runs-on: [arc-runner-set] + permissions: + checks: read + statuses: read + steps: + - name: Run Merge Gatekeeper + uses: upsidr/merge-gatekeeper@v1 + with: + timeout: 1200 + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/repo--release-please.yml similarity index 100% rename from .github/workflows/release-please.yml rename to .github/workflows/repo--release-please.yml diff --git a/.github/workflows/typo-check.yml b/.github/workflows/repo--typo-check.yml similarity index 100% rename from .github/workflows/typo-check.yml rename to .github/workflows/repo--typo-check.yml diff --git a/.github/workflows/validate-pr-title.yml b/.github/workflows/repo--validate-pr-title.yml similarity index 100% rename from .github/workflows/validate-pr-title.yml rename to .github/workflows/repo--validate-pr-title.yml