forked from xiph/rav1e
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.5 KB
/
devcontainer.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
name: Build devcontainer image
on:
push:
branches:
- master
paths:
- '.github/workflows/devcontainer.yml'
- '.devcontainer/**'
jobs:
devcontainer:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install devcontainer-cli
run: npm install -g @devcontainers/cli
- name: Register qemu binfmt-misc entries for Docker
run: docker run --privileged --rm tonistiigi/binfmt --install aarch64
- name: Authenticate with ghcr.io
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Build devcontainer image
run: |
IMAGE_NAME=rav1e-devcontainer
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
VERSION=latest
IMAGE_TAG=${IMAGE_ID,,}:$VERSION
devcontainer build --image-name $IMAGE_TAG-amd64 --platform linux/amd64 --push \
--workspace-folder $PWD --config .devcontainer/build-amd64.json
docker run -v $PWD/.devcontainer:/devcontainer --rm $IMAGE_TAG-amd64 \
bash -c "cd /devcontainer; ./cargo-extra-cross.sh"
devcontainer build --image-name $IMAGE_TAG-arm64 --platform linux/arm64 --push \
--workspace-folder $PWD --config .devcontainer/build-arm64.json
docker manifest create $IMAGE_TAG \
--amend $IMAGE_TAG-amd64 \
--amend $IMAGE_TAG-arm64
docker manifest push $IMAGE_TAG