Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(repo): fix workflows, restore merge-gatekeeper #18471

Merged
merged 1 commit into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/bridge-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
build-and-test:
if: ${{ github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
uses: ./.github/workflows/bridge-ui--ci.yml

# Deployment name follow the pattern: deploy_<appname(bridge-ui)>_<network(devnet|hekla|mainnet)>_<environment(preview|production)>
Expand All @@ -37,7 +37,7 @@ jobs:

# Hekla testnet
deploy_bridge-ui_hekla_preview:
if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand All @@ -62,7 +62,7 @@ jobs:

# Mainnet
deploy_bridge-ui_mainnet_preview:
if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-site--preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
deploy-docs-site-preview:
if: ${{ github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [arc-runner-set]
steps:
- name: Install Git
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/eventindexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
jobs:
lint-eventindexer:
name: lint-eventindexer
if: github.event_name == 'pull_request'
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please' && !startsWith(github.head_ref, 'refs/heads/dependabot/')) }}
runs-on: [arc-runner-set]
steps:
- uses: actions/setup-go@v5
Expand All @@ -38,7 +38,7 @@ jobs:

test-eventindexer:
runs-on: [arc-runner-set]
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please' && !startsWith(github.head_ref, 'refs/heads/dependabot/')) }}
needs: lint-eventindexer
steps:
- name: Cancel Previous Runs
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:

push-eventindexer-docker-image:
# Skip dependabot PRs
if: ${{ github.event_name == 'pull_request' && ! startsWith(github.ref, 'refs/heads/dependabot/') }}
if: ${{ github.event_name == 'pull_request' && ! startsWith(github.head_ref, 'refs/heads/dependabot/') && !startsWith(github.head_ref, 'release-please') }}
name: Build and push docker image
runs-on: [arc-runner-set]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fork-diff--preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
deploy-fork-diff-preview:
if: ${{ github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [arc-runner-set]
steps:
- name: Install Git
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/guardian-prover-health-check-ui--ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: workflow_call

jobs:
check-guardian-prover-health-check-ui:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && !startsWith(github.head_ref, 'refs/heads/dependabot/') }}
runs-on: [taiko-runner]
steps:
- name: Cancel previous runs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/guardian-prover-health-check-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
# Deployment name follow the pattern: deploy_<appname(guardian-prover-health-check-ui)>_<network(devnet|hekla|mainnet)>_<environment(preview|production)>

# deploy_guardians-ui_devnet_preview:
# if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
# if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
# needs: build-and-test
# uses: ./.github/workflows/repo--vercel-deploy.yml
# with:
Expand All @@ -31,7 +31,7 @@ jobs:


deploy_guardians-ui_hekla_preview:
if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand All @@ -43,7 +43,7 @@ jobs:
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_guardians-ui_mainnet_preview:
if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/guardian-prover-health-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
lint-guardian-prover-health-check:
if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
name: lint-guardian-prover-health-check
runs-on: [taiko-runner]
steps:
Expand All @@ -36,7 +36,7 @@ jobs:
args: --config=.golangci.yml --timeout=4m

test-guardian-prover-health-check:
if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [taiko-runner]
needs: lint-guardian-prover-health-check
steps:
Expand All @@ -62,7 +62,7 @@ jobs:

push-guardian-prover-health-check-docker-image:
# Skip dependabot PRs
if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please' && !startsWith(github.head_ref, 'refs/heads/dependabot/')) }}
name: Build and push docker image
runs-on: [taiko-runner]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nfts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build-nfts-contracts:
if: ${{ github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [arc-runner-set]
steps:
- name: Cancel previous runs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protocol-monitors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
deploy-protocol-monitors:
if: ${{ github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [taiko-runner]
permissions:
# Give the necessary permissions for stefanzweifel/git-auto-commit-action.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
build-protocol:
if: ${{ github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [arc-runner-set]
permissions:
# Give the necessary permissions for stefanzweifel/git-auto-commit-action.
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
pnpm test:deploy:l1

genesis-docker:
if: ${{ github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [taiko-runner]
permissions:
# Give the necessary permissions for stefanzweifel/git-auto-commit-action.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
jobs:
lint-relayer:
name: lint-relayer
if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && !startsWith(github.head_ref, 'refs/heads/dependabot/')}}
runs-on: [arc-runner-set]
steps:
- uses: actions/setup-go@v5
Expand All @@ -37,7 +37,7 @@ jobs:
args: --config=.golangci.yml --timeout=4m

test-relayer:
if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && !startsWith(github.head_ref, 'refs/heads/dependabot/') }}
runs-on: [arc-runner-set]
needs: lint-relayer
steps:
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:

push-relayer-docker-image:
# Skip dependabot PRs
if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && !startsWith(github.head_ref, 'refs/heads/dependabot/') }}
name: Build and push docker image
runs-on: [arc-runner-set]

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/repo--merge-gatekeeper.yml
Original file line number Diff line number Diff line change
@@ -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'
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 }}
2 changes: 1 addition & 1 deletion .github/workflows/supplementary-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build-supplementary-contracts:
if: ${{ github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [arc-runner-set]
steps:
- name: Cancel previous runs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/taiko-client--hive_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
hive_tests:
if: contains(github.event.pull_request.labels.*.name, 'option.workflow_on') && github.event.pull_request.draft == false && github.head_ref != 'release-please-*'
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
name: hive tests
runs-on: [arc-runner-set]
timeout-minutes: 40
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/taiko-client--test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
lint:
if: ${{ github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
name: Lint
runs-on: [ubuntu-latest]
steps:
Expand All @@ -32,7 +32,7 @@ jobs:
run: golangci-lint run --path-prefix=./ --config=.golangci.yml

integration_tests:
if: ${{ github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
name: Integration tests
runs-on: [ubuntu-latest]
timeout-minutes: 15
Expand Down