Skip to content

Commit 0fe8669

Browse files
committed
ci: prebuild devcontainer and use it from cache
1 parent 446295d commit 0fe8669

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.devcontainer/devcontainer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "AoC-Python",
33
"build": {
4-
"dockerfile": "Dockerfile"
4+
"dockerfile": "Dockerfile",
5+
"cacheFrom": "ghcr.io/nikobockerman/adventofcode-python-devcontainer:cache"
56
},
67
"features": {
78
"ghcr.io/devcontainers/features/python:1": {

.github/workflows/ci-cd.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ on:
99
workflow_dispatch:
1010
permissions:
1111
contents: read
12+
packages: write
1213

1314
jobs:
1415
ci:
1516
uses: ./.github/workflows/ci.yaml
17+
deploy-devcontainer-cache:
18+
needs: ci
19+
uses: nikobockerman/github-workflows/.github/workflows/devcontainer-cache.yaml@cc3e3fdec0b2379e550c1ea4059cb79f455ff668
20+
with:
21+
cache-type: final

.github/workflows/ci.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,13 @@ jobs:
2828
run-all:
2929
uses: ./.github/workflows/run-all.yaml
3030

31+
prebuild-devcontainer:
32+
uses: nikobockerman/github-workflows/.github/workflows/devcontainer-cache.yaml@cc3e3fdec0b2379e550c1ea4059cb79f455ff668
33+
permissions:
34+
contents: read
35+
packages: write
36+
with:
37+
cache-type: intermediate
3138
check-devcontainer:
39+
needs: prebuild-devcontainer
3240
uses: ./.github/workflows/check-devcontainer.yaml

0 commit comments

Comments
 (0)