Skip to content

Commit 548512d

Browse files
committed
Deduplicate deduplication logic in CI
1 parent 6b3933f commit 548512d

File tree

2 files changed

+51
-29
lines changed

2 files changed

+51
-29
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,38 @@
11
{
22
"features": {
3+
"ghcr.io/devcontainers-extra/features/fzf:1.0.14": {
4+
"version": "1.0.14",
5+
"resolved": "ghcr.io/devcontainers-extra/features/fzf@sha256:0267f658774be0ac66ac0f78ffd0673486513443ffc65cd92216b69af0929398",
6+
"integrity": "sha256:0267f658774be0ac66ac0f78ffd0673486513443ffc65cd92216b69af0929398"
7+
},
8+
"ghcr.io/devcontainers/features/common-utils": {
9+
"version": "2.5.2",
10+
"resolved": "ghcr.io/devcontainers/features/common-utils@sha256:5b1c376d30719a4dead8fb2f272ee496cfb506f2f92b7acf9e1c24cb5399ba7d",
11+
"integrity": "sha256:5b1c376d30719a4dead8fb2f272ee496cfb506f2f92b7acf9e1c24cb5399ba7d"
12+
},
313
"ghcr.io/devcontainers/features/common-utils:2.2.0": {
414
"version": "2.2.0",
515
"resolved": "ghcr.io/devcontainers/features/common-utils@sha256:8d0f43896efd556a53e5881a726417e50fcdda874fd535919a8f8feeac42383e",
616
"integrity": "sha256:8d0f43896efd556a53e5881a726417e50fcdda874fd535919a8f8feeac42383e"
17+
},
18+
"ghcr.io/devcontainers/features/git": {
19+
"version": "1.3.2",
20+
"resolved": "ghcr.io/devcontainers/features/git@sha256:63c96e8ac33f5630300d8883e2ec3123278de70d318589af596ea1954846014d",
21+
"integrity": "sha256:63c96e8ac33f5630300d8883e2ec3123278de70d318589af596ea1954846014d"
22+
},
23+
"ghcr.io/duduribeiro/devcontainer-features/neovim:1.0.1": {
24+
"version": "1.0.1",
25+
"resolved": "ghcr.io/duduribeiro/devcontainer-features/neovim@sha256:bc0189d90386de0f8a72393de2bb1402bdff8072a608e1aa362761b2a0da3fd6",
26+
"integrity": "sha256:bc0189d90386de0f8a72393de2bb1402bdff8072a608e1aa362761b2a0da3fd6",
27+
"dependsOn": [
28+
"ghcr.io/devcontainers/features/common-utils",
29+
"ghcr.io/devcontainers/features/git"
30+
]
31+
},
32+
"ghcr.io/GeorgOfenbeck/features/lazygit-linuxbinary:1.0.0": {
33+
"version": "1.0.0",
34+
"resolved": "ghcr.io/georgofenbeck/features/lazygit-linuxbinary@sha256:5f95752dbaf9a2798039e7cfd09887dca886654899de5c3c257d870c74230523",
35+
"integrity": "sha256:5f95752dbaf9a2798039e7cfd09887dca886654899de5c3c257d870c74230523"
736
}
837
}
938
}

.github/workflows/ci.yaml

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,28 @@ on:
55
pull_request:
66

77
jobs:
8-
devcontainer:
8+
deduplicate:
99
# Deduplicate jobs from pull requests and branch pushes within the same repo.
1010
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
11+
runs-on: ubuntu-latest
12+
steps:
13+
- run: echo Job intentionally left empty
14+
15+
devcontainer:
16+
needs: deduplicate
1117
uses: ./.github/workflows/_devcontainer.yaml
1218

1319
bundler_lint:
14-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
15-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
20+
needs: deduplicate
1621
uses: ./.github/workflows/_bundler_lint.yaml
1722

1823
bundler_test:
19-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
20-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
24+
needs: deduplicate
2125
uses: ./.github/workflows/_bundler_test.yaml
2226

2327
bundler_container:
24-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
25-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
2628
needs:
29+
- deduplicate
2730
- bundler_lint
2831
- bundler_test
2932
permissions:
@@ -32,24 +35,20 @@ jobs:
3235
uses: ./.github/workflows/_bundler_container.yaml
3336

3437
bundler_docs:
35-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
36-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
38+
needs: deduplicate
3739
uses: ./.github/workflows/_bundler_docs.yaml
3840

3941
policy_lint:
40-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
41-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
42+
needs: deduplicate
4243
uses: ./.github/workflows/_policy_lint.yaml
4344

4445
policy_test:
45-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
46-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
46+
needs: deduplicate
4747
uses: ./.github/workflows/_policy_test.yaml
4848

4949
policy_container:
50-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
51-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
5250
needs:
51+
- deduplicate
5352
- policy_lint
5453
- policy_test
5554
permissions:
@@ -58,48 +57,42 @@ jobs:
5857
uses: ./.github/workflows/_policy_container.yaml
5958

6059
helm_chart_lint:
61-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
62-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
60+
needs: deduplicate
6361
uses: ./.github/workflows/_helm_chart_lint.yaml
6462

6563
helm_chart_publish:
66-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
67-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
68-
needs: helm_chart_lint
64+
needs:
65+
- deduplicate
66+
- helm_chart_lint
6967
permissions:
7068
contents: read
7169
packages: write
7270
uses: ./.github/workflows/_helm_chart_publish.yaml
7371

7472
docs_lint:
75-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
76-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
73+
needs: deduplicate
7774
uses: ./.github/workflows/_docs_lint.yaml
7875

7976
docs_build:
80-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
81-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
77+
needs: deduplicate
8278
uses: ./.github/workflows/_docs_build.yaml
8379

8480
techdocs_publish:
85-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
86-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
8781
needs:
82+
- deduplicate
8883
- docs_lint
8984
- docs_build
9085
uses: ./.github/workflows/_techdocs_publish.yaml
9186

9287
pages_build:
93-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
94-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
9588
needs:
89+
- deduplicate
9690
- bundler_docs
9791
- docs_lint
9892
- docs_build
9993
uses: ./.github/workflows/_pages_build.yaml
10094

10195
pages_publish:
102-
# Deduplicate jobs from pull requests and branch pushes within the same repo.
10396
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
10497
needs: pages_build
10598
permissions:

0 commit comments

Comments
 (0)