Skip to content

Commit

Permalink
Use a multi-arch manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Feb 10, 2025
1 parent 226faf8 commit 50cc897
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ on:

jobs:
build:
runs-on: ubuntu-24.04${{matrix.arch=='arm' && '-arm' || ''}}
runs-on: ubuntu-24.04${{matrix.arch=='arm64' && '-arm' || ''}}
strategy:
fail-fast: false
matrix:
os: [ 'debian', 'ubuntu' ]
arch: [ 'intel', 'arm' ]
arch: [ 'amd64', 'arm64' ]
steps:
- name: Free some disk space
run: rm -Rf /usr/share/dotnet /opt/ghc "/usr/local/share/boost" "$AGENT_TOOLSDIRECTORY"
Expand Down Expand Up @@ -53,5 +53,23 @@ jobs:
context: ${{ matrix.os }}
push: true
tags: |
cran/${{matrix.os}}:latest
ghcr.io/${{github.repository}}/${{matrix.os}}:latest
ghcr.io/${{github.repository}}/${{matrix.os}}:latest_{matrix.arch}
manifest:
runs-on: ubuntu-24.04
needs: [build]
strategy:
fail-fast: false
matrix:
os: [ 'debian', 'ubuntu' ]
steps:
- name: Free some disk space
run: rm -Rf /usr/share/dotnet /opt/ghc "/usr/local/share/boost" "$AGENT_TOOLSDIRECTORY"

- name: Create multi-arch manifest
run: |
docker manifest create \
ghcr.io/${{github.repository}}/${{matrix.os}}:latest \
ghcr.io/${{github.repository}}/${{matrix.os}}:latest_amd64 \
ghcr.io/${{github.repository}}/${{matrix.os}}:latest_arm64
docker manifest push ghcr.io/${{github.repository}}/${{matrix.os}}:latest

0 comments on commit 50cc897

Please sign in to comment.