Skip to content

Commit d50d351

Browse files
chore(dev): update devcontainer build pipeline
1 parent afc4b6c commit d50d351

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/build-devcontainer-image.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ jobs:
1919
id: checkout
2020
uses: actions/checkout@v1
2121

22+
- name: Log in to GitHub Container Registry
23+
uses: docker/login-action@v2
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@v1
31+
32+
- name: Set up Docker Buildx
33+
id: buildx
34+
uses: docker/setup-buildx-action@v1
35+
2236
- name: Prepare DevPod
2337
run: |
2438
curl -L -o devpod "https://github.com/loft-sh/devpod/releases/latest/download/devpod-linux-amd64" \
@@ -29,13 +43,13 @@ jobs:
2943
- name: "Build and push image"
3044
run: |
3145
devpod build . --devcontainer-path .github/devcontainer/devcontainer.json --platform linux/amd64,linux/arm64 --skip-push
32-
# Change tag to `latest`
3346
ID=$(docker images --format "{{.ID}} {{.CreatedAt}} {{.Tag}}" | sort -rk 2 | grep "devpod" | awk 'NR==1{print $1}')
3447
echo "found image: $ID"
3548
if [ -z "${ID}" ]; then
3649
echo "Image ID empty, exiting"
3750
exit 0
3851
fi
52+
# Change tag to `dev`
3953
docker image ls
4054
docker tag $ID ghcr.io/loft-sh/devpod:dev
4155
docker push ghcr.io/loft-sh/devpod:dev

0 commit comments

Comments
 (0)