forked from micromdm/micromdm
-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (29 loc) · 1.08 KB
/
docker.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
name: Publish Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Build and push Docker image
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Set up QEMU for multi-architecture builds
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 #v2.1.0
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Check out this repo
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
- name: Login to Github Packages Container registry with ephemeral token
run: docker login ghcr.io --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
- name: Create builder instance
run: docker buildx create --use
- name: Build and push image
run: |
docker buildx build \
--platform linux/amd64,linux/arm,linux/arm64 \
--tag ghcr.io/micromdm/micromdm:latest \
--tag ghcr.io/micromdm/micromdm:${{ github.event.release.tag_name }} \
--push \
.