Skip to content

Commit

Permalink
Merge pull request #477 from gassmoeller/docker_build_for_m1
Browse files Browse the repository at this point in the history
Push to ghcr and build for Apple Silicon
  • Loading branch information
feathern authored May 7, 2024
2 parents 65a38fa + 6674dd8 commit 3be47da
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,37 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_LOGIN }}

- name: Build and push Docker image for master
- name: Build and push Docker image for main
if: contains(github.event_name, 'push')
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: ./docker/rayleigh/
cache-from: type=registry,ref=geodynamics/rayleigh-buildenv-jammy
cache-to: type=inline
platforms: linux/amd64,linux/arm64
push: true
tags: geodynamics/rayleigh:latest
tags: |
ghcr.io/${{ github.repository }}:latest
${{ github.repository }}:latest
- name: Build and push Docker image for release
if: contains(github.event_name, 'release')
Expand All @@ -49,6 +62,8 @@ jobs:
context: ./docker/rayleigh/
cache-from: type=registry,ref=geodynamics/rayleigh-buildenv-jammy
cache-to: type=inline
platforms: linux/amd64,linux/arm64
push: true
tags: geodynamics/rayleigh:${{github.ref_name}}

tags: |
ghcr.io/${{ github.repository }}:${{github.ref_name}}
${{ github.repository }}:${{github.ref_name}}

0 comments on commit 3be47da

Please sign in to comment.