Test new macos image #25
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 (Test) | |
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: Enable QEMU Emulation | |
uses: docker/setup-qemu-action@v2 | |
- name: Enable Buildx for Multi-Platform | |
uses: docker/setup-buildx-action@v2 | |
- name: Test QEMU Emulation | |
run: | | |
docker run --rm --platform=linux/amd64 ubuntu uname -m | |
- name: Build and Push Test Docker Image (Linux amd64) | |
if: github.event_name == 'push' | |
run: | | |
docker buildx build \ | |
--platform linux/amd64 \ | |
--no-cache \ | |
--tag ghcr.io/${{ github.repository_owner }}/test_fmr:latest \ | |
--push \ | |
. | |
- name: Build Docker Image for macOS Test (amd64 workaround) | |
if: github.event_name == 'pull_request' | |
run: | | |
docker buildx build \ | |
--platform linux/amd64 \ | |
--load \ | |
--tag ghcr.io/${{ github.repository_owner }}/test_fmr:macos-test \ | |
. | |
- name: Verify Built Image | |
run: | | |
docker inspect ghcr.io/${{ github.repository_owner }}/test_fmr:macos-test | grep Architecture |