forked from linkerd/linkerd2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
40 lines (37 loc) · 1.29 KB
/
action.yml
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
name: Rust Docker Manifest
description: Creates a unified docker image manifest for rust multiarch builds
inputs:
docker-ghcr-username:
description: GH username under which to push images
required: true
docker-ghcr-pat:
description: GH PAT for docker-ghcr-username
required: true
component:
description: Image to build
required: true
tag:
description: Docker image tag
required: true
runs:
using: composite
steps:
- uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
with:
registry: ghcr.io
username: ${{ inputs.docker-ghcr-username }}
password: ${{ inputs.docker-ghcr-pat }}
- name: Create multiarch manifest
shell: bash
run: |
img=ghcr.io/${{ github.repository_owner }}/${{ inputs.component }}:${{ inputs.tag }}
docker manifest create $img ${img}-amd64 ${img}-arm64 ${img}-arm
for arch in amd64 arm64 arm ; do
docker manifest annotate $img ${img}-${arch} --os=linux --arch=${arch}
done
- run: docker manifest push ghcr.io/${{ github.repository_owner }}/${{ inputs.component }}:${{ inputs.tag }}
shell: bash
outputs:
image:
description: The image that was built
value: ghcr.io/${{ github.repository_owner }}/${{ inputs.component }}:${{ inputs.tag }}