-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.32 KB
/
container.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
name: container
run-name: Build container sandbox
on: workflow_dispatch
env:
IMAGE_REGISTRY: docker.io
jobs:
entrusted_container:
name: CONTAINER MULTI-ARCH
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare environment
shell: bash
run: |
APPVERSION=$(grep "^version" app/entrusted_client/Cargo.toml | cut -d'=' -f2 | xargs)
echo "entrusted_version=$APPVERSION" >> $GITHUB_ENV
sudo apt-get update
sudo apt-get install -y qemu-user-static
sudo apt-get clean
- name: Build image
uses: redhat-actions/buildah-build@v2
with:
archs: amd64, arm64
image: ${{ env.IMAGE_REGISTRY }}/${{ secrets.DOCKERHUB_USERNAME }}/entrusted_container
tags: ${{ env.entrusted_version }}
oci: false
context: app
containerfiles: |
app/entrusted_container/Dockerfile
extra-args: |
--squash
- name: Publish image
uses: redhat-actions/push-to-registry@v2
with:
image: entrusted_container
tags: ${{ env.entrusted_version }}
registry: ${{ env.IMAGE_REGISTRY }}/${{ secrets.DOCKERHUB_USERNAME }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
extra-args: |
--format docker