Skip to content

Commit

Permalink
chore(repo): workflows skip dependabot prs (#18701)
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerLamTd authored Jan 3, 2025
1 parent 13a5b1b commit ca3987a
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 16 deletions.
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 && !startsWith(github.head_ref, 'release-please') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
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.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
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.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
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 && !startsWith(github.head_ref, 'release-please') && github.event.pull_request.head.repo.fork == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]' }}
runs-on: [arc-runner-set]
steps:
- name: Install Git
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 && !startsWith(github.head_ref, 'release-please') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
runs-on: [arc-runner-set]
steps:
- name: Install Git
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/guardian-prover-health-check-ui--ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ 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
5 changes: 3 additions & 2 deletions .github/workflows/guardian-prover-health-check-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

jobs:
build-and-test:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
uses: ./.github/workflows/guardian-prover-health-check-ui--ci.yml

# Deployment name follow the pattern: deploy_<appname(guardian-prover-health-check-ui)>_<network(devnet|hekla|mainnet)>_<environment(preview|production)>
Expand All @@ -31,7 +32,7 @@ jobs:


deploy_guardians-ui_hekla_preview:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand All @@ -43,7 +44,7 @@ jobs:
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_guardians-ui_mainnet_preview:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
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 @@ -13,7 +13,7 @@ on:

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

test-guardian-prover-health-check:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
runs-on: [taiko-runner]
needs: lint-guardian-prover-health-check
steps:
Expand All @@ -58,7 +58,7 @@ jobs:

push-guardian-prover-health-check-docker-image:
# Skip dependabot PRs
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && !startsWith(github.head_ref, 'refs/heads/dependabot/') && github.event.pull_request.head.repo.fork == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.fork == false }}
name: Build and push docker image
runs-on: [taiko-runner]

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 @@ -11,7 +11,7 @@ on:

jobs:
deploy-protocol-monitors:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
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 && !startsWith(github.head_ref, 'release-please') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
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 && !startsWith(github.head_ref, 'release-please') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
runs-on: [taiko-runner]
permissions:
# Give the necessary permissions for stefanzweifel/git-auto-commit-action.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repo--typo-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [pull_request]

jobs:
check-for-typos:
if: contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*'
if: ${{ contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*' && github.actor != 'dependabot[bot]' }}
runs-on: [arc-runner-set]

steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/snaefell-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:

jobs:
build-and-test:
if: ${{ github.actor != 'dependabot[bot]' }}
uses: ./.github/workflows/snaefell-ui--ci.yml

# Deployment name follow the pattern: deploy_<appname(snaefell-ui)>_<network(devnet|hekla|mainnet)>_<environment(preview|production)>
# The following Vercel project is not found, so disable it at least for now.
deploy_snaefell-ui_mainnet_preview:
if: ${{ github.actor != 'dependabot[bot]' }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand All @@ -21,6 +23,7 @@ jobs:
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_snaefell-ui_mainnet_production:
if: ${{ github.actor != 'dependabot[bot]' }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/taiko-client--test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
lint:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
name: Lint
runs-on: [ubuntu-latest]
steps:
Expand Down

0 comments on commit ca3987a

Please sign in to comment.