-
Notifications
You must be signed in to change notification settings - Fork 90
57 lines (52 loc) · 1.91 KB
/
push-as-image-to-ghcr.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
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build and Push CoCoAS / RVPS Image
on:
push:
branches:
- main
jobs:
build_and_push_as_image:
permissions:
packages: write
uses: ./.github/workflows/build-as-image.yml
with:
build_option: --push
secrets: inherit
publish_multi_arch_image:
needs: build_and_push_as_image
permissions:
packages: write
strategy:
fail-fast: false
matrix:
tag:
- coco-as-grpc
- coco-as-restful
- rvps
include:
- tag: coco-as-grpc
name: gRPC CoCo-AS
- tag: coco-as-restful
name: RESTful CoCo-AS
- tag: rvps
name: RVPS
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Multi-arch Image for ${{ matrix.name }}
run: |
commit_sha=${{ github.sha }}
docker manifest create "ghcr.io/confidential-containers/staged-images/${{ matrix.tag }}:${commit_sha}" \
--amend "ghcr.io/confidential-containers/staged-images/${{ matrix.tag }}:${commit_sha}-s390x" \
--amend "ghcr.io/confidential-containers/staged-images/${{ matrix.tag }}:${commit_sha}-x86_64"
docker manifest push "ghcr.io/confidential-containers/staged-images/${{ matrix.tag }}:${commit_sha}"
docker manifest create "ghcr.io/confidential-containers/staged-images/${{ matrix.tag }}:latest" \
--amend "ghcr.io/confidential-containers/staged-images/${{ matrix.tag }}:latest-s390x" \
--amend "ghcr.io/confidential-containers/staged-images/${{ matrix.tag }}:latest-x86_64"
docker manifest push "ghcr.io/confidential-containers/staged-images/${{ matrix.tag }}:latest"