-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: move dry-run to a parallel workflow
Also skip the entire workflow when a pull request comes from a fork (and therefore does not have access to our GHA secrets). Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
- Loading branch information
Showing
2 changed files
with
40 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: CI | ||
on: | ||
push: | ||
# Run on all branches in our repo, so that we test dry-run for our PRs too | ||
# branches: [main] | ||
# Don't run on forks, which don't have access to secrets | ||
# pull_request: | ||
# branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:latest | ||
env: | ||
POSTGRES_DB: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_USER: postgres | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
env: | ||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- run: npm ci | ||
- name: Evaluate the last Spark round in dry-run mode | ||
# Don't run on forks, which don't have access to secrets | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | ||
run: node bin/dry-run.js | ||
env: | ||
GLIF_TOKEN: ${{ secrets.GLIF_TOKEN }} |