Skip to content

Commit 84d32fb

Browse files
committed
Rip out CI path filtering
As it turns out, this doesn't actually work: if job A is skipped due to a path rule, and job B depends on A, then B isn't run either. To work around that, one has to resort to various hacks (https://github.com/orgs/community/discussions/45058), which I'm not interested in. Since CI containers change rarely, we'll just move back to using a separate workflow that we have to trigger in the right order.
1 parent c2f1506 commit 84d32fb

File tree

2 files changed

+14
-53
lines changed

2 files changed

+14
-53
lines changed

.github/workflows/containers.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
---
22
name: Build CI containers
33
on:
4-
workflow_call:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- '.github/workflows/container.yml'
10+
- '.github/workflows/containers.yml'
11+
- 'ci/**/*'
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
515

616
permissions:
717
contents: read

.github/workflows/push.yml

+3-52
Original file line numberDiff line numberDiff line change
@@ -19,55 +19,9 @@ env:
1919
RUSTUP_HOME: ${{ github.workspace }}/.rustup-home
2020

2121
jobs:
22-
changes:
23-
name: 'Detect changes'
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/checkout@v4
27-
- run: git config --global --add safe.directory $PWD
28-
- uses: dorny/paths-filter@v3
29-
id: changes
30-
with:
31-
filters: |
32-
docs:
33-
- '.github/**'
34-
- 'ci/**'
35-
- 'docs/**'
36-
- Makefile
37-
std:
38-
- '**/*.inko'
39-
- '**/*.rs'
40-
- 'ci/**'
41-
- Makefile
42-
ci:
43-
- '.github/**'
44-
- 'ci/**'
45-
container:
46-
- '**/*.inko'
47-
- '**/*.rs'
48-
- '.github/**'
49-
- Dockerfile
50-
outputs:
51-
docs: ${{ steps.changes.outputs.docs }}
52-
std: ${{ steps.changes.outputs.std }}
53-
ci: ${{ steps.changes.outputs.ci }}
54-
container: ${{ steps.changes.outputs.container }}
55-
56-
ci-containers:
57-
name: CI containers
58-
uses: ./.github/workflows/containers.yml
59-
needs:
60-
- changes
61-
if: needs.changes.outputs.ci == 'true'
62-
permissions:
63-
contents: read
64-
packages: write
65-
6622
tests:
6723
name: Tests
6824
uses: ./.github/workflows/tests.yml
69-
needs:
70-
- ci-containers
7125

7226
nightly-container:
7327
name: Nightly container
@@ -76,9 +30,8 @@ jobs:
7630
contents: read
7731
packages: write
7832
needs:
79-
- changes
8033
- tests
81-
if: github.ref_name == 'main' && needs.changes.outputs.container == 'true'
34+
if: github.ref_name == 'main'
8235
steps:
8336
- uses: actions/checkout@v4
8437
- uses: docker/login-action@v3
@@ -107,9 +60,8 @@ jobs:
10760
RCLONE_S3_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }}
10861
RCLONE_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
10962
needs:
110-
- changes
11163
- tests
112-
if: github.ref_name == 'main' && needs.changes.outputs.docs
64+
if: github.ref_name == 'main'
11365
steps:
11466
- name: Install dependencies
11567
run: microdnf install --quiet --assumeyes rclone git tar make
@@ -134,10 +86,9 @@ jobs:
13486
RCLONE_S3_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }}
13587
RCLONE_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
13688
needs:
137-
- changes
13889
- tests
13990
if: |
140-
github.ref_name == 'main' && needs.changes.outputs.std
91+
github.ref_name == 'main'
14192
steps:
14293
- uses: actions/checkout@v4
14394
- uses: actions/cache@v4

0 commit comments

Comments
 (0)