snapserver-arm64v8-buildx #1
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
name: snapserver-arm64v8-buildx | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "master" | |
paths: | |
- "snapserver/**" | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# Set up QEMU for cross-architecture builds | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
# Set up Docker Buildx | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and Push | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
context: "${{ github.server_url }}/${{ github.repository }}.git#${{ github.ref }}:snapserver" | |
tags: | | |
${{ secrets.DOCKERHUB_SLUG }}/snapserver:arm64v8-latest | |
${{ secrets.DOCKERHUB_SLUG }}/snapserver:arm64v8-${{github.run_number}} | |
platforms: linux/arm64 | |
build-args: | | |
target_arch=arm64 |