Skip to content

Commit e4f689f

Browse files
committed
fix(ci): stale updates shouldn't fail everything
1 parent 64d3b25 commit e4f689f

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/taimihud-datasources.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
attrs: nixpkgs.diffutils
3030
command: diff
3131
main:
32+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork
3233
name: taimihud-datasources-main
3334
permissions:
3435
contents: write
@@ -107,6 +108,7 @@ jobs:
107108
with:
108109
files: .ci/artifacts/share/taimihud/sources.toml
109110
updates:
111+
if: github.event_name != 'push'
110112
name: taimihud-datasources-updates
111113
runs-on: ubuntu-latest
112114
steps:
@@ -165,5 +167,6 @@ jobs:
165167
stdin: ${{ runner.temp }}/ci.build.cache
166168
name: taimihud-datasources
167169
'on':
168-
- push
169-
- pull_request
170+
pull_request: {}
171+
push: {}
172+
workflow_dispatch: {}

ci/config.nix

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,17 @@ in
4848
'') config.artifactPackages)));
4949

5050
gh-actions = {
51-
jobs = mkIf (config.id != "ci" && config.artifactPackage != null) {
52-
${config.id} = {
51+
on = {
52+
push = {};
53+
pull_request = {};
54+
workflow_dispatch = {};
55+
};
56+
jobs = {
57+
updates = mkIf (config.id == "updates") {
58+
"if" = "github.event_name != 'push'";
59+
};
60+
main = mkIf (config.id == "main" && config.artifactPackage != null) {
61+
"if" = "github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork";
5362
permissions = {
5463
contents = "write";
5564
};

0 commit comments

Comments
 (0)