-
Notifications
You must be signed in to change notification settings - Fork 10
41 lines (35 loc) · 1.08 KB
/
docker-build-arm64.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
name: Docker Build ARM64
on:
push:
tags:
- 'v*'
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/moqrelay
jobs:
build-arm64:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Log in to registry
if: github.event_name != 'pull_request'
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Build arm64 image
run: |
docker build . -f docker/Dockerfile \
--platform linux/arm64 \
-t ghcr.io/${{ env.IMAGE_NAME }}:latest-arm64 \
-t ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64
- name: Push arm64 image
if: github.event_name != 'pull_request'
run: |
docker push ghcr.io/${{ env.IMAGE_NAME }}:latest-arm64
docker push ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64