-
Notifications
You must be signed in to change notification settings - Fork 124
51 lines (45 loc) · 1.46 KB
/
devcontainer-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Dev Container Build and Push Image
on:
push:
tags:
- "devcontainer/v*.*.*"
jobs:
devcontainer-build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Compute tag for devcontainer image
id: meta
run: |
tag="${GITHUB_REF#refs/tags/devcontainer/v}"
echo "tag=$tag" >> "$GITHUB_OUTPUT"
- name: Set up Depot CLI
uses: depot/setup-action@v1
with:
oidc: true
- name: Setup Docker to use Depot
run: depot configure-docker
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and release devcontainer Multi-Platform
run: |
npm install -g @devcontainers/cli
devcontainer build \
--workspace-folder .github \
--image-name ghcr.io/${{ github.repository }}/devcontainer:${{ steps.meta.outputs.tag }} \
--image-name ghcr.io/${{ github.repository }}/devcontainer:latest \
--platform linux/amd64,linux/arm64 \
--push
env:
# see: https://github.com/devcontainers/ci/issues/191#issuecomment-1603857155
BUILDX_NO_DEFAULT_ATTESTATIONS: true