From 473a76966ceccd317f14ca482988dfc2372cfec7 Mon Sep 17 00:00:00 2001 From: jariy17 Date: Tue, 22 Sep 2026 21:01:53 +0000 Subject: [PATCH 1/3] ci: skip CI jobs for release pushes --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35bbc4260..092639b8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,9 @@ concurrency: cancel-in-progress: true jobs: + # Release pushes are verified by release-publish before publishing. verify: + if: github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'chore(release):') uses: ./.github/workflows/verify.yml permissions: contents: read @@ -23,7 +25,7 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} e2e: - if: github.event_name == 'push' + if: github.event_name == 'push' && !startsWith(github.event.head_commit.message, 'chore(release):') uses: ./.github/workflows/e2e-test.yml permissions: id-token: write From 23c6e82b7415643851260e538dac07601e77d82b Mon Sep 17 00:00:00 2001 From: jariy17 Date: Tue, 22 Sep 2026 21:16:49 +0000 Subject: [PATCH 2/3] ci: confirm bot-created release PR before skipping checks --- .github/workflows/ci.yml | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 092639b8d..81e3f27c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,37 @@ concurrency: cancel-in-progress: true jobs: - # Release pushes are verified by release-publish before publishing. + check-release: + if: github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release):') + runs-on: ubuntu-latest + permissions: + pull-requests: read + outputs: + is_release: ${{ steps.check.outputs.is_release }} + steps: + - name: Check for a merged release PR + id: check + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + IS_RELEASE=$(gh api --paginate --slurp "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/pulls" \ + | jq -r --arg repository "$GITHUB_REPOSITORY" --arg ref "$GITHUB_REF_NAME" --arg sha "$GITHUB_SHA" ' + any(.[][]; + # Stable account ID for agentcore-devx-automation[bot]. + .user.id == 282717993 and + .merged_at != null and + .merge_commit_sha == $sha and + .head.repo.full_name == $repository and + .base.ref == $ref and + (.head.ref | startswith("release/v")) + )') + echo "is_release=$IS_RELEASE" >> "$GITHUB_OUTPUT" + + # Only confirmed release pushes skip CI; a skipped or failed lookup still runs CI. verify: - if: github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'chore(release):') + needs: check-release + if: ${{ !cancelled() && needs.check-release.outputs.is_release != 'true' }} uses: ./.github/workflows/verify.yml permissions: contents: read @@ -25,7 +53,8 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} e2e: - if: github.event_name == 'push' && !startsWith(github.event.head_commit.message, 'chore(release):') + needs: check-release + if: ${{ !cancelled() && github.event_name == 'push' && needs.check-release.outputs.is_release != 'true' }} uses: ./.github/workflows/e2e-test.yml permissions: id-token: write From bce48962180031ce321c2d9dc9f23e1b4b0877ee Mon Sep 17 00:00:00 2001 From: jariy17 Date: Tue, 22 Sep 2026 21:45:34 +0000 Subject: [PATCH 3/3] ci: simplify release skip to commit prefix and bot author --- .github/workflows/ci.yml | 41 +++++++++------------------------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81e3f27c1..c2eacad98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,37 +13,12 @@ concurrency: cancel-in-progress: true jobs: - check-release: - if: github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release):') - runs-on: ubuntu-latest - permissions: - pull-requests: read - outputs: - is_release: ${{ steps.check.outputs.is_release }} - steps: - - name: Check for a merged release PR - id: check - env: - GH_TOKEN: ${{ github.token }} - run: | - set -euo pipefail - IS_RELEASE=$(gh api --paginate --slurp "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/pulls" \ - | jq -r --arg repository "$GITHUB_REPOSITORY" --arg ref "$GITHUB_REF_NAME" --arg sha "$GITHUB_SHA" ' - any(.[][]; - # Stable account ID for agentcore-devx-automation[bot]. - .user.id == 282717993 and - .merged_at != null and - .merge_commit_sha == $sha and - .head.repo.full_name == $repository and - .base.ref == $ref and - (.head.ref | startswith("release/v")) - )') - echo "is_release=$IS_RELEASE" >> "$GITHUB_OUTPUT" - - # Only confirmed release pushes skip CI; a skipped or failed lookup still runs CI. + # Bot-authored release pushes are verified by release-publish before publishing. verify: - needs: check-release - if: ${{ !cancelled() && needs.check-release.outputs.is_release != 'true' }} + if: >- + github.event_name != 'push' || + !(startsWith(github.event.head_commit.message, 'chore(release):') && + github.event.head_commit.author.username == 'agentcore-devx-automation[bot]') uses: ./.github/workflows/verify.yml permissions: contents: read @@ -53,8 +28,10 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} e2e: - needs: check-release - if: ${{ !cancelled() && github.event_name == 'push' && needs.check-release.outputs.is_release != 'true' }} + if: >- + github.event_name == 'push' && + !(startsWith(github.event.head_commit.message, 'chore(release):') && + github.event.head_commit.author.username == 'agentcore-devx-automation[bot]') uses: ./.github/workflows/e2e-test.yml permissions: id-token: write