-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (44 loc) · 1.82 KB
/
devcontainer-ci.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
---
name: devcontainer-ci
on:
push:
paths:
- .github/workflows/devcontainer-ci.yml
- images/iggy-cpp-build/.devcontainer/*
env:
DOCKERHUB_REGISTRY_NAME: iggyrs/iggy-cpp-build
permissions: read-all
jobs:
pre-build-container:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx for multi-architecture builds
uses: docker/setup-buildx-action@v3
with:
use: true
- name: Install updated Skopeo
# This can be omitted once runner images have a version of Skopeo > 1.4.1
# See https://github.com/containers/skopeo/issues/1874
run: |
REPO_URL="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04"
sudo sh -c "echo 'deb ${REPO_URL}/ /' > /etc/apt/sources.list.d/skopeo.list"
curl -fsSL ${REPO_URL}/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/skopeo.gpg > /dev/null
sudo apt update
sudo apt install skopeo
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Pre-build image
uses: devcontainers/[email protected]
with:
subFolder: images/iggy-cpp-build
imageName: ${{ env.DOCKERHUB_REGISTRY_NAME }}
cacheFrom: ${{ env.DOCKERHUB_REGISTRY_NAME }}
platform: linux/amd64,linux/arm64
push: always