forked from micromdm/micromdm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docker workflow. Add ARM build. (micromdm#745)
- Loading branch information
1 parent
f681a2b
commit 6e51f09
Showing
3 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
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@c308fdd69d26ed66f4506ebd74b180abe5362145 #v1.1.0 | ||
with: | ||
image: tonistiigi/binfmt:latest | ||
platforms: all | ||
|
||
- name: Check out this repo | ||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 | ||
with: | ||
fetch-depth: 1 # Checkout only latest commit | ||
|
||
- 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 \ | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters