Update GHCR workflow to provide a separate macOS release #18
Workflow file for this run
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 | |
pull_request: | |
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 }} | |
- name: Build Docker Image for Linux (amd64) | |
run: | | |
docker build -t ghcr.io/${{ github.repository_owner }}/fast-music-remover:latest . | |
- name: Push Docker Image for Linux (amd64) | |
if: github.event_name == 'push' | |
run: | | |
docker push ghcr.io/${{ github.repository_owner }}/fast-music-remover:latest | |
- name: Build Docker Image for macOS (amd64 workaround) | |
run: | | |
docker build --platform linux/amd64 -t ghcr.io/${{ github.repository_owner }}/fast-music-remover:macos-latest . | |
- name: Push Docker Image for macOS (amd64 workaround) | |
if: github.event_name == 'push' | |
run: | | |
docker push ghcr.io/${{ github.repository_owner }}/fast-music-remover:macos-latest |