Skip to content

Commit 93d112f

Browse files
authored
feat: use GitHub Action cache in container actions
This replaces the usage of the inline cache in the container actions. Fixes: #128 Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
1 parent 73f858a commit 93d112f

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.github/actions/container/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ runs:
6868
DOCKER_BUILDKIT: 1
6969
BUILDKIT_INLINE_CACHE: 1
7070
with:
71-
cache-from: type=registry,ref=${{ inputs.repository }}
72-
cache-to: type=inline
71+
cache-from: type=gha
72+
cache-to: type=gha,mode=max
7373
context: ${{ inputs.context }}
7474
push: ${{ inputs.push }}
7575
tags: |

.github/actions/devcontainer/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ runs:
114114
run: |
115115
devcontainer build \
116116
--workspace-folder ${{ inputs.workspace }} \
117-
--cache-from ${{ inputs.repository }} \
118-
--cache-to type=inline \
117+
--cache-from type=gha \
118+
--cache-to type=gha,mode=max \
119119
--platform ${{ inputs.platforms }} \
120120
--image-name ${{ inputs.repository }}:${{ steps.git.outputs.short_sha }} \
121121
--output type=image,name=${{ inputs.repository }}:${{ steps.git.outputs.short_sha }},push=${{ inputs.push }}

.github/workflows/containers.yml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- '!devcontainers/janus/CHANGELOG.md'
1010
- '.devcontainer/**'
1111
- '!.devcontainer/CHANGELOG.md'
12+
- '.github/workflows/containers.yml'
13+
- '.github/actions/container/**'
14+
- '.github/actions/devcontainer/**'
1215

1316
concurrency:
1417
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

0 commit comments

Comments
 (0)