-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (46 loc) · 1.52 KB
/
publish_docker_image.yaml
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
on:
push:
branches:
- main
- rc-*
- hotfix/*
- release/*
env:
DOCKER_REPO: planetariumhq/arena-service
jobs:
publish_docker_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: login
run: |
docker login \
--username '${{ secrets.DOCKER_USERNAME }}' \
--password '${{ secrets.DOCKER_ACCESS_TOKEN }}'
- name: setup-qemu
run: |
docker run --rm --privileged multiarch/qemu-user-static \
--reset \
-p yes
- name: build-and-push-amd64
run: |
docker build . \
-f ArenaService/ArenaService/Dockerfile.amd64 \
-t $DOCKER_REPO:git-${{ github.sha }}-amd64 \
--build-arg COMMIT=git-${{ github.sha }}
docker push $DOCKER_REPO:git-${{ github.sha }}-amd64
- name: build-and-push-arm64v8
run: |
docker build . \
-f ArenaService/ArenaService/Dockerfile.arm64v8 \
-t $DOCKER_REPO:git-${{ github.sha }}-arm64v8 \
--build-arg COMMIT=git-${{ github.sha }}
docker push $DOCKER_REPO:git-${{ github.sha }}-arm64v8
- name: merge-manifest-and-push
run: |
docker manifest create $DOCKER_REPO:git-${{ github.sha }} \
--amend $DOCKER_REPO:git-${{ github.sha }}-amd64 \
--amend $DOCKER_REPO:git-${{ github.sha }}-arm64v8
docker manifest push $DOCKER_REPO:git-${{ github.sha }}