Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Pod VM Builder Image | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
name: Create pod vm builder image | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
# Please keep this list in alphabetical order. | |
- centos | |
- ubuntu | |
include: | |
- os: centos | |
dockerfile: Dockerfile.podvm_builder.centos | |
- os: ubuntu | |
dockerfile: Dockerfile.podvm_builder | |
runner: | |
- ubuntu-latest | |
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 | |
protoc_version="$(yq '.tools.protoc' versions.yaml)" | |
[ -n "$protoc_version" ] | |
echo "PROTOC_VERSION=${protoc_version}" >> $GITHUB_ENV | |
rust_version="$(yq '.tools.rust' versions.yaml)" | |
[ -n "$rust_version" ] | |
echo "RUST_VERSION=${rust_version}" >> $GITHUB_ENV | |
caa_src="$(yq '.git.cloud-api-adaptor.url' versions.yaml)" | |
[ -n "$caa_src" ] | |
echo "CAA_SRC=${caa_src}" >> $GITHUB_ENV | |
caa_src_ref="$(yq '.git.cloud-api-adaptor.reference' versions.yaml)" | |
[ -n "$caa_src_ref" ] | |
echo "CAA_SRC_REF=${caa_src_ref}" >> $GITHUB_ENV | |
kata_src="$(yq '.git.kata-containers.url' versions.yaml)" | |
[ -n "$kata_src" ] | |
echo "KATA_SRC=${kata_src}" >> $GITHUB_ENV | |
kata_src_branch="$(yq '.git.kata-containers.reference' versions.yaml)" | |
[ "$kata_src_branch" ] | |
echo "KATA_SRC_BRANCH=${kata_src_branch}" >> $GITHUB_ENV | |
#- name: Set up QEMU | |
# uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: docker.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- 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/podvm-builder-${{ matrix.os }}:latest | |
quay.io/confidential-containers/podvm-builder-${{ matrix.os }}:${{ github.sha }} | |
push: true | |
context: podvm | |
platforms: linux/amd64 | |
file: | | |
podvm/${{ matrix.dockerfile }} | |
build-args: | | |
"GO_VERSION=${{ env.GO_VERSION }}" | |
"PROTOC_VERSION=${{ env.PROTOC_VERSION }}" | |
"RUST_VERSION=${{ env.RUST_VERSION }}" | |
"CAA_SRC=${{ env.CAA_SRC }}" | |
"CAA_SRC_REF=${{ env.CAA_SRC_REF }}" | |
"KATA_SRC=${{ env.KATA_SRC }}" | |
"KATA_SRC_BRANCH=${{ env.KATA_SRC_BRANCH }}" |