Skip to content

Commit

Permalink
ci: Only run Docs and Test jobs when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangwalther committed Feb 21, 2024
1 parent 15debe0 commit 9018ee2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
name: Docs

on:
push:
branches:
- main
- v[0-9]+
pull_request:
pull_request: &pull_request
branches:
- main
- v[0-9]+
- main
- v[0-9]+
paths:
- .github/workflows/docs.yaml
- .github/actions/setup-nix/**
- default.nix
- nix/**
- docs/**
- '!**.md'
push:
<<: *pull_request

jobs:
build:
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
name: Test

on:
pull:
pull_request: &pull_request
branches:
- main
- v[0-9]+
paths:
- .github/workflows/test.yaml
- .github/actions/setup-nix/**
- default.nix
- nix/**
- .stylish-haskell.yaml
- postgrest.cabal
- '**.hs'
- test/**
- '!**.md'
push:
<<: *pull_request
tags:
- v*
pull_request:
branches:
- main
- v[0-9]+

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion nix/tools/style.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ let
.github/release
echo "Linting workflows..."
${actionlint}/bin/actionlint
${actionlint}/bin/actionlint --ignore 'unexpected key "<<"'
'';

in
Expand Down

0 comments on commit 9018ee2

Please sign in to comment.