-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.73 KB
/
push-trustee-cli-to-ghcr.yml
File metadata and controls
62 lines (52 loc) · 1.73 KB
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
58
59
60
61
name: Build and Push trustee-cli
on:
push:
branches:
- main
permissions: {}
jobs:
build_and_push:
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
instance: ubuntu-24.04
- arch: s390x
instance: s390x
- arch: aarch64
instance: ubuntu-24.04-arm
runs-on: ${{ matrix.instance }}
permissions:
contents: read
packages: write
steps:
- name: Install ORAS
uses: oras-project/setup-oras@22ce207df3b08e061f537244349aac6ae1d214f6 # v1.2.4
with:
version: 1.0.0
- name: Check out code
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Log in to ghcr.io
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build a statically linked trustee for ${{ matrix.arch }} linux
run: |
docker buildx build -f tools/trustee-cli/Dockerfile \
--build-arg ARCH="${{ matrix.arch }}" --output ./ .
- name: Push to ghcr.io
run: |
commit_sha=${{ github.sha }}
oras push \
ghcr.io/confidential-containers/staged-images/trustee-cli:${commit_sha}-${{ matrix.arch }},latest-${{ matrix.arch }} \
./usr/local/bin/trustee
if [ "${{ matrix.arch }}" = "x86_64" ]; then
oras push ghcr.io/confidential-containers/staged-images/trustee-cli:latest ./usr/local/bin/trustee
fi