Skip to content

Commit 50fcf08

Browse files
committed
Add Docker metadata, Buildx, and layer caching to release workflow
1 parent a45448e commit 50fcf08

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/release-image.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,25 @@ jobs:
2626
username: ${{ github.actor }}
2727
password: ${{ secrets.GITHUB_TOKEN }}
2828

29+
- name: Docker metadata
30+
id: meta
31+
uses: docker/metadata-action@v5
32+
with:
33+
images: ghcr.io/${{ github.repository_owner }}/devcontainer
34+
tags: |
35+
type=sha
36+
type=raw,value=latest
37+
type=schedule,pattern={{date 'YYYYMMDD'}}
38+
39+
- name: Set up Docker Buildx
40+
uses: docker/setup-buildx-action@v3
41+
2942
- name: Build and push
3043
uses: docker/build-push-action@v6
3144
with:
3245
context: ./image
3346
push: true
34-
tags: ghcr.io/${{ github.repository_owner }}/devcontainer:latest
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}
49+
cache-from: type=gha
50+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)