-
Notifications
You must be signed in to change notification settings - Fork 88
59 lines (56 loc) · 1.61 KB
/
csi_wrapper_images.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
# (C) Copyright Confidential Containers Contributors 2023.
# SPDX-License-Identifier: Apache-2.0
#
# Build and push csi wrapper images for each arch.
---
name: csi wrapper images
on:
push:
branches:
- 'main'
paths:
- 'volumes/csi-wrapper/**'
workflow_dispatch:
env:
go_version: "1.20.7"
jobs:
build_push_job:
name: build and push
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
binary:
- csi-controller-wrapper
- csi-node-wrapper
- csi-podvm-wrapper
steps:
- name: Checkout the code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Golang version ${{ env.go_version }}
uses: actions/setup-go@v4
with:
go-version: ${{ env.go_version }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to quay Container Registry
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v3
with:
tags: |
quay.io/confidential-containers/${{matrix.binary}}:latest
quay.io/confidential-containers/${{matrix.binary}}:${{ github.sha }}
push: true
context: volumes/csi-wrapper
platforms: linux/amd64, linux/s390x, linux/ppc64le
file: volumes/csi-wrapper/Dockerfile.csi_wrappers
build-args: |
"BINARY=${{matrix.binary}}"
"SOURCE_FROM=remote"