Docs: Update README and CONTRIBUTING with new rules/examples (#92) #32
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: Build and Publish Docker Images | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Login to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# Required for cross-platform builds with buildx to emulate foreign archs | |
- name: Enable QEMU Emulation | |
uses: docker/setup-qemu-action@v2 | |
# Required for multi-arch image | |
- name: Enable Buildx for Multi-Platform | |
uses: docker/setup-buildx-action@v2 | |
# Build and Push Multi-Arch Image: | |
# Thanks to buildx, this image works for both archs (amd64/arm64) | |
# Docker resolves the arch per platform for us, via the manifest | |
- name: Build and Push Multi-Arch Image | |
run: | | |
docker buildx build \ | |
--platform linux/amd64,linux/arm64 \ | |
--no-cache \ | |
--tag ghcr.io/${{ github.repository_owner }}/fast-music-remover:latest \ | |
--push \ | |
. |