forked from confidential-containers/cloud-api-adaptor
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (72 loc) · 2.13 KB
/
podvm_binaries.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: (Callable) Build and push podvm_binaries image
on:
workflow_call:
inputs:
registry:
default: 'quay.io/confidential-containers'
required: false
type: string
image_tag:
default: ''
required: false
type: string
git_ref:
description: Git ref to checkout the cloud-api-adaptor repository.
required: true
type: string
defaults:
run:
working-directory: src/cloud-api-adaptor
jobs:
build:
name: Create pod vm binaries image
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
os: [ubuntu]
arch: [amd64, s390x]
include:
- os: ubuntu
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: "${{ inputs.git_ref }}"
- name: Rebase the code
if: github.event_name == 'pull_request_target'
working-directory: ./
run: |
./hack/ci-helper.sh rebase-atop-of-the-latest-target-branch
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker container Registry
if: ${{ startsWith(inputs.registry, 'docker.io') }}
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Quay container Registry
if: ${{ startsWith(inputs.registry, 'quay.io') }}
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Login to Github Container Registry
if: ${{ startsWith(inputs.registry, 'ghcr.io') }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
run: make podvm-binaries
env:
PUSH: true
REGISTRY: ${{ inputs.registry }}
ARCH: ${{ matrix.arch }}
PODVM_TAG: ${{ inputs.image_tag }}
PODVM_DISTRO: ${{ matrix.os }}