-
Notifications
You must be signed in to change notification settings - Fork 8
41 lines (34 loc) · 1.19 KB
/
main-ci.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: Hugin API Main Pipeline
env:
GITHUB_REGISTRY: "ghcr.io"
GITHUB_OWNER: "kryptokrona"
GITHUB_DOCKER_IMAGE: "hugin-api"
on:
push:
branches:
- main
jobs:
build-docker:
name: Build Docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: benjlevesque/[email protected]
- name: Log into registry ghcr.io
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Build Docker
run: |
docker build --no-cache -t $GITHUB_REGISTRY/$GITHUB_OWNER/$GITHUB_DOCKER_IMAGE:${{ env.SHA }} .
docker buildx build --no-cache --platform linux/arm64 -o type=docker -t $GITHUB_REGISTRY/$GITHUB_OWNER/$GITHUB_DOCKER_IMAGE-arm64:${{ env.SHA }} .
- name: Publish Docker
run: |
docker push $GITHUB_REGISTRY/$GITHUB_OWNER/$GITHUB_DOCKER_IMAGE:${{ env.SHA }}
docker push $GITHUB_REGISTRY/$GITHUB_OWNER/$GITHUB_DOCKER_IMAGE-arm64:${{ env.SHA }}