Skip to content

Commit 9533590

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

File tree

2 files changed

+49
-29
lines changed

2 files changed

+49
-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: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,26 @@ 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+
steps: []
12+
13+
devcontainer:
14+
needs: deduplicate
1115
uses: ./.github/workflows/_devcontainer.yaml
1216

1317
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
18+
needs: deduplicate
1619
uses: ./.github/workflows/_bundler_lint.yaml
1720

1821
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
22+
needs: deduplicate
2123
uses: ./.github/workflows/_bundler_test.yaml
2224

2325
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
2626
needs:
27+
- deduplicate
2728
- bundler_lint
2829
- bundler_test
2930
permissions:
@@ -32,24 +33,20 @@ jobs:
3233
uses: ./.github/workflows/_bundler_container.yaml
3334

3435
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
36+
needs: deduplicate
3737
uses: ./.github/workflows/_bundler_docs.yaml
3838

3939
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
40+
needs: deduplicate
4241
uses: ./.github/workflows/_policy_lint.yaml
4342

4443
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
44+
needs: deduplicate
4745
uses: ./.github/workflows/_policy_test.yaml
4846

4947
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
5248
needs:
49+
- deduplicate
5350
- policy_lint
5451
- policy_test
5552
permissions:
@@ -58,48 +55,42 @@ jobs:
5855
uses: ./.github/workflows/_policy_container.yaml
5956

6057
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
58+
needs: deduplicate
6359
uses: ./.github/workflows/_helm_chart_lint.yaml
6460

6561
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
62+
needs:
63+
- deduplicate
64+
- helm_chart_lint
6965
permissions:
7066
contents: read
7167
packages: write
7268
uses: ./.github/workflows/_helm_chart_publish.yaml
7369

7470
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
71+
needs: deduplicate
7772
uses: ./.github/workflows/_docs_lint.yaml
7873

7974
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
75+
needs: deduplicate
8276
uses: ./.github/workflows/_docs_build.yaml
8377

8478
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
8779
needs:
80+
- deduplicate
8881
- docs_lint
8982
- docs_build
9083
uses: ./.github/workflows/_techdocs_publish.yaml
9184

9285
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
9586
needs:
87+
- deduplicate
9688
- bundler_docs
9789
- docs_lint
9890
- docs_build
9991
uses: ./.github/workflows/_pages_build.yaml
10092

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

0 commit comments

Comments
 (0)