-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (31 loc) · 1.35 KB
/
build-dockers.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
name: Dockers
on:
push:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ldclabs/idempotent-proxy
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Build the Docker image
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --use
docker login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} ${{ env.REGISTRY }}
IMAGE_TAG="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}"
LATEST_TAG="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
TAGS="-t ${IMAGE_TAG} -t ${LATEST_TAG}"
docker buildx build --platform='linux/amd64,linux/arm64' $TAGS --push .
IMAGE_TAG="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}_enclave_arm64:${{ github.ref_name }}"
LATEST_TAG="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}_enclave_arm64:latest"
TAGS="-t ${IMAGE_TAG} -t ${LATEST_TAG}"
docker build -f enclave/arm64.Dockerfile $TAGS --push .
IMAGE_TAG="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}_enclave_amd64:${{ github.ref_name }}"
LATEST_TAG="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}_enclave_amd64:latest"
TAGS="-t ${IMAGE_TAG} -t ${LATEST_TAG}"
docker build -f enclave/amd64.Dockerfile $TAGS --push .