Dockerize the app

This commit is contained in:
Gardner Bickford
2022-06-18 13:18:48 +12:00
parent 17a27a138b
commit a9c051b743
17 changed files with 224 additions and 53 deletions
+24
View File
@@ -0,0 +1,24 @@
---
name: 'build images'
# See https://itnext.io/building-multi-cpu-architecture-docker-images-for-arm-and-x86-3-building-in-github-action-ci-a382feab5af9
on:
push:
branches:
- master
jobs:
build-docker-images:
name: Build Docker Images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Package Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build & Push Docker image
run: docker buildx build -t ghcr.io/${{ github.repository_owner }}/myimage:${GITHUB_SHA} -f [path to Dockerfile] --push --platform=linux/arm64,linux/amd64 [path to build context]