Skip to content

Commit 0ce2042

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

File tree

2 files changed

+48
-29
lines changed

2 files changed

+48
-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: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@ 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+
12+
devcontainer:
13+
needs: deduplicate
1114
uses: ./.github/workflows/_devcontainer.yaml
1215

1316
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
17+
needs: deduplicate
1618
uses: ./.github/workflows/_bundler_lint.yaml
1719

1820
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
21+
needs: deduplicate
2122
uses: ./.github/workflows/_bundler_test.yaml
2223

2324
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
25+
needs: deduplicate
2626
needs:
2727
- bundler_lint
2828
- bundler_test
@@ -32,24 +32,20 @@ jobs:
3232
uses: ./.github/workflows/_bundler_container.yaml
3333

3434
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
35+
needs: deduplicate
3736
uses: ./.github/workflows/_bundler_docs.yaml
3837

3938
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
39+
needs: deduplicate
4240
uses: ./.github/workflows/_policy_lint.yaml
4341

4442
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
43+
needs: deduplicate
4744
uses: ./.github/workflows/_policy_test.yaml
4845

4946
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
5247
needs:
48+
- deduplicate
5349
- policy_lint
5450
- policy_test
5551
permissions:
@@ -58,48 +54,42 @@ jobs:
5854
uses: ./.github/workflows/_policy_container.yaml
5955

6056
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
57+
needs: deduplicate
6358
uses: ./.github/workflows/_helm_chart_lint.yaml
6459

6560
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
61+
needs:
62+
- deduplicate
63+
- helm_chart_lint
6964
permissions:
7065
contents: read
7166
packages: write
7267
uses: ./.github/workflows/_helm_chart_publish.yaml
7368

7469
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
70+
needs: deduplicate
7771
uses: ./.github/workflows/_docs_lint.yaml
7872

7973
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
74+
needs: deduplicate
8275
uses: ./.github/workflows/_docs_build.yaml
8376

8477
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
8778
needs:
79+
- deduplicate
8880
- docs_lint
8981
- docs_build
9082
uses: ./.github/workflows/_techdocs_publish.yaml
9183

9284
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
9585
needs:
86+
- deduplicate
9687
- bundler_docs
9788
- docs_lint
9889
- docs_build
9990
uses: ./.github/workflows/_pages_build.yaml
10091

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

0 commit comments

Comments
 (0)