-
Notifications
You must be signed in to change notification settings - Fork 84
59 lines (54 loc) · 1.73 KB
/
peerpod-ctrl_image.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
# Copyright Confidential Containers Contributors
# SPDX-License-Identifier: Apache-2.0
#
# Push peerpod-ctrl image
---
name: peerpod-ctrl image push
on:
push:
branches:
- main
- huoqifeng/peerpod-ctl-img
jobs:
peerpod_push:
name: Push peerpod-ctrl image
runs-on: ubuntu-latest
defaults:
run:
working-directory: peerpod-ctrl
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Read properties from versions.yaml
run: |
go_version="$(yq '.tools.golang' ../versions.yaml)"
[ -n "$go_version" ]
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
- 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: Install build dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libvirt-dev
- name: Login to Quay container Registry
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Validate build args contains the essentials
run: |
make list-build-args | grep -e 'CGO_ENABLED=[0|1]' && \
make list-build-args | grep 'GOFLAGS=' | grep -E '\-tags=[a-z,]*'
- name: Build and push
uses: docker/build-push-action@v3
with:
tags: |
quay.io/confidential-containers/peerpod-ctrl:latest
quay.io/confidential-containers/peerpod-ctrl:${{ github.sha }}
context: peerpod-ctrl
platforms: linux/s390x