Skip to content
Open
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
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ on:

jobs:
build:
# only run in forks — non-fork PRs get a build via preview-deployment.yml
if: github.event.pull_request.head.repo.full_name != github.repository
# Runs wherever preview-deployment.yml cannot. Fork PRs and Dependabot PRs
# both get a read-only GITHUB_TOKEN with no access to secrets, so the
# preview deploy fails on them; this plain build is their only check.
if: >-
github.event.pull_request.head.repo.full_name != github.repository ||
github.event.pull_request.user.login == 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pr-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ on:

jobs:
release_preview_canister:
# do not run in forks
if: github.event.pull_request.head.repo.full_name == github.repository
# Mirror preview-deployment.yml: only PRs that got a preview canister have
# one to release. Fork and Dependabot PRs never allocate one.
if: >-
github.event.pull_request.head.repo.full_name == github.repository &&
github.event.pull_request.user.login != 'dependabot[bot]'
runs-on: ubuntu-latest
concurrency:
group: pr-${{ github.event.pull_request.number || github.event.number }}
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/preview-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ on:

jobs:
build_and_deploy:
# do not run in forks
if: github.event.pull_request.head.repo.full_name == github.repository
# Needs repo secrets and write access to post the preview comment, so skip
# any PR whose runs get a read-only token: forks and Dependabot. Those are
# covered by build.yml instead.
if: >-
github.event.pull_request.head.repo.full_name == github.repository &&
github.event.pull_request.user.login != 'dependabot[bot]'
runs-on: ubuntu-latest
concurrency:
group: pr-${{ github.event.pull_request.number || github.event.number }}
Expand Down
Loading