Skip to content

Instantly share code, notes, and snippets.

@csharpfritz
Created February 26, 2024 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csharpfritz/2d4ff2968b3c4df6dd9985c0600a8792 to your computer and use it in GitHub Desktop.
Save csharpfritz/2d4ff2968b3c4df6dd9985c0600a8792 to your computer and use it in GitHub Desktop.
GitHub action to build my ASP.NET Core application to run on an ARM32 Pi
name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: fritzregistry.azurecr.io
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build the Docker image
run: docker build --platform linux/arm --file Fritz.DemoPi/Dockerfile-ARM32 --tag fritzregistry.azurecr.io/fritz.demopi:$(date +%s) --tag fritzregistry.azurecr.io/fritz.demopi:latest .
- name: Push the Docker image
run: docker push fritzregistry.azurecr.io/fritz.demopi -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment