Skip to content

Commit 4eaa13c

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

File tree

2 files changed

+50
-29
lines changed

2 files changed

+50
-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: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,27 @@ 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+
- name: Empty
13+
14+
devcontainer:
15+
needs: deduplicate
1116
uses: ./.github/workflows/_devcontainer.yaml
1217

1318
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
19+
needs: deduplicate
1620
uses: ./.github/workflows/_bundler_lint.yaml
1721

1822
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
23+
needs: deduplicate
2124
uses: ./.github/workflows/_bundler_test.yaml
2225

2326
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
2627
needs:
28+
- deduplicate
2729
- bundler_lint
2830
- bundler_test
2931
permissions:
@@ -32,24 +34,20 @@ jobs:
3234
uses: ./.github/workflows/_bundler_container.yaml
3335

3436
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
37+
needs: deduplicate
3738
uses: ./.github/workflows/_bundler_docs.yaml
3839

3940
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
41+
needs: deduplicate
4242
uses: ./.github/workflows/_policy_lint.yaml
4343

4444
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
45+
needs: deduplicate
4746
uses: ./.github/workflows/_policy_test.yaml
4847

4948
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
5249
needs:
50+
- deduplicate
5351
- policy_lint
5452
- policy_test
5553
permissions:
@@ -58,48 +56,42 @@ jobs:
5856
uses: ./.github/workflows/_policy_container.yaml
5957

6058
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
59+
needs: deduplicate
6360
uses: ./.github/workflows/_helm_chart_lint.yaml
6461

6562
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
63+
needs:
64+
- deduplicate
65+
- helm_chart_lint
6966
permissions:
7067
contents: read
7168
packages: write
7269
uses: ./.github/workflows/_helm_chart_publish.yaml
7370

7471
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
72+
needs: deduplicate
7773
uses: ./.github/workflows/_docs_lint.yaml
7874

7975
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
76+
needs: deduplicate
8277
uses: ./.github/workflows/_docs_build.yaml
8378

8479
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
8780
needs:
81+
- deduplicate
8882
- docs_lint
8983
- docs_build
9084
uses: ./.github/workflows/_techdocs_publish.yaml
9185

9286
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
9587
needs:
88+
- deduplicate
9689
- bundler_docs
9790
- docs_lint
9891
- docs_build
9992
uses: ./.github/workflows/_pages_build.yaml
10093

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

0 commit comments

Comments
 (0)