Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Updated to include amd64
Browse files Browse the repository at this point in the history
  • Loading branch information
djthorpe committed Jan 8, 2024
1 parent b164609 commit 4d84ca8
Showing 1 changed file with 36 additions and 6 deletions.
42 changes: 36 additions & 6 deletions .github/workflows/make-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
release:
types: [ created, edited ]
jobs:
build:
build-arm64:
strategy:
matrix:
version: [ 2.311.0 ]
Expand All @@ -17,7 +17,39 @@ jobs:
run: |
echo "arch=${{ matrix.arch }}" >> $GITHUB_OUTPUT
echo "runner=${{ matrix.version }}" >> $GITHUB_OUTPUT
echo "image=ghcr.io/${{ github.repository_owner }}/runner-image-arm" >> $GITHUB_OUTPUT
echo "image=ghcr.io/${{ github.repository_owner }}/runner-image-${{ matrix.arch }}" >> $GITHUB_OUTPUT
echo "tag=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: |
docker build \
--tag ${{ steps.tags.outputs.image }}:${{ steps.tags.outputs.tag }} \
--build-arg RUNNER_VERSION=${{ steps.tags.outputs.runner }} \
--build-arg RUNNER_ARCH=${{ steps.tags.outputs.arch }} \
--file Dockerfile-bookworm .
- name: Push
run: |
docker push ${{ steps.tags.outputs.image }}:${{ steps.tags.outputs.tag }}
build-amd64:
strategy:
matrix:
version: [ 2.311.0 ]
arch: [ amd64 ]
runs-on: [ linux, amd64 ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set tags
id: tags
run: |
echo "arch=${{ matrix.arch }}" >> $GITHUB_OUTPUT
echo "runner=${{ matrix.version }}" >> $GITHUB_OUTPUT
echo "image=ghcr.io/${{ github.repository_owner }}/runner-image-${{ matrix.arch }}" >> $GITHUB_OUTPUT
echo "tag=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Login
uses: docker/login-action@v3
Expand All @@ -37,7 +69,8 @@ jobs:
docker push ${{ steps.tags.outputs.image }}:${{ steps.tags.outputs.tag }}
manifest:
needs:
- build
- build-arm64
- build-amd64
runs-on: ubuntu-latest
steps:
- name: Set tags
Expand All @@ -54,13 +87,10 @@ jobs:
- name: Create Manifest
run: |
docker manifest create ${{ steps.tags.outputs.manifest }}:${{ steps.tags.outputs.tag }} \
--amend ${{ steps.tags.outputs.manifest }}-arm:${{ steps.tags.outputs.tag }} \
--amend ${{ steps.tags.outputs.manifest }}-arm64:${{ steps.tags.outputs.tag }}
--amend ${{ steps.tags.outputs.manifest }}-amd64:${{ steps.tags.outputs.tag }}
docker manifest annotate --arch arm64 ${{ steps.tags.outputs.manifest }}:${{ steps.tags.outputs.tag }} \
${{ steps.tags.outputs.manifest }}-arm64:${{ steps.tags.outputs.tag }}
docker manifest annotate --arch arm ${{ steps.tags.outputs.manifest }}:${{ steps.tags.outputs.tag }} \
${{ steps.tags.outputs.manifest }}-arm:${{ steps.tags.outputs.tag }}
docker manifest annotate --arch amd64 ${{ steps.tags.outputs.manifest }}:${{ steps.tags.outputs.tag }} \
${{ steps.tags.outputs.manifest }}-amd64:${{ steps.tags.outputs.tag }}
docker manifest push ${{ steps.tags.outputs.manifest }}:${{ steps.tags.outputs.tag }}

0 comments on commit 4d84ca8

Please sign in to comment.