mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-13 05:45:41 +08:00
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
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@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # 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 \
|
|
.
|