This repository has been archived by the owner on Jun 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.67 KB
/
make-images.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Make arm64 and amd64 docker images
on:
workflow_dispatch:
env:
version: 2.311.0
jobs:
build-images:
strategy:
matrix:
platform: [ linux ]
arch: [ arm64, amd64 ]
uses: mutablelogic/docker-action-runner/.github/workflows/build-image.yaml@main
with:
platform: ${{ matrix.platform }}
arch: ${{ matrix.arch }}
version: 2.311.0
create-manifest:
needs:
- build-images
runs-on: ubuntu-latest
steps:
- name: Set tags
id: tags
run: |
echo "manifest=ghcr.io/${{ github.repository_owner }}/runner-image" >> $GITHUB_OUTPUT
echo "tag=${{ env.version }}" >> $GITHUB_OUTPUT
- name: Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create Manifest
run: |
docker manifest create ${{ steps.tags.outputs.manifest }}:${{ 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 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 }}