-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (55 loc) · 1.76 KB
/
docker-image.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
52
53
54
55
56
57
58
59
60
61
name: Docker Image CI
on:
push:
# branches:
# - 'main'
env:
CERBERUS_IMAGE_ID: ghcr.io/galoisinc/verse-opensut/cerberus:release
OPENSUT_BASE_IMAGE_ID: ghcr.io/galoisinc/verse-opensut/opensut-base:latest
jobs:
cerberus:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Checkout Cerberus submodule
run: git submodule update --init src/cerberus
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.VERSE_OPENSUT_ACCESS_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build multi-platform image
uses: docker/build-push-action@v5
with:
context: src/cerberus
platforms: linux/amd64,linux/arm64
push: true
tags: ${{env.CERBERUS_IMAGE_ID}}
file: src/cerberus/Dockerfile.ubuntu
github-token: ${{ secrets.VERSE_OPENSUT_ACCESS_TOKEN }}
opensut-base:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.VERSE_VHOST_DEVICE_ACCESS_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.VERSE_OPENSUT_ACCESS_TOKEN }}
- name: Build the Docker image
run: |
echo "Building ${{env.OPENSUT_BASE_IMAGE_ID}}"
docker build . --file Dockerfile --tag ${{env.OPENSUT_BASE_IMAGE_ID}}
- name: Push the Docker image
run: docker push ${{env.OPENSUT_BASE_IMAGE_ID}}