-
Notifications
You must be signed in to change notification settings - Fork 77
44 lines (37 loc) · 1.11 KB
/
merge_image.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
41
42
43
44
name: Merge Multi-platform Image Manifests
on:
workflow_call:
inputs:
app_version:
required: true
type: string
env:
IMAGE_ID: ghcr.io/xline-kv/xline
jobs:
merge_image:
runs-on: ubuntu-latest
name: Merge Docker Image
steps:
- name: Download Digests
uses: actions/download-artifact@v3
with:
name: digests
path: /tmp/digests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: xline-kv
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Manifest
working-directory: /tmp/digests
run: |
docker buildx imagetools create \
-t ${{ env.IMAGE_ID }}:latest \
-t ${{ env.IMAGE_ID }}:${{ inputs.app_version }} \
$(printf '${{ env.IMAGE_ID }}@sha256:%s ' *)
- name: Inspect Manifest
run: |
docker buildx imagetools inspect ${{ env.IMAGE_ID }}:${{ inputs.app_version }}