azure: use version.yaml hash keys in podvm build #345
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
# Copyright Confidential Containers Contributors | |
# SPDX-License-Identifier: Apache-2.0 | |
# | |
# Run tests for peerpod and peerpodconfig controllers. | |
--- | |
name: controllers | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
peerpodconfig_job: | |
name: peerpodconfig-ctrl | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: peerpodconfig-ctrl | |
steps: | |
- name: Checkout the pull request 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: Verify go modules and manifests | |
run: make verify | |
- name: Build the controller manager | |
run: make build | |
- name: Run unit tests | |
run: make test | |
- name: Build the controller image | |
run: make docker-build | |
peerpod_job: | |
name: peerpod-ctrl | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: peerpod-ctrl | |
steps: | |
- name: Checkout the pull request 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: Install build dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y libvirt-dev | |
- name: Setup Golang version ${{ env.GO_VERSION }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Verify go modules and manifests | |
run: make verify | |
- name: Build the controller manager | |
run: make build | |
- name: Run unit tests | |
run: make test | |
- name: Build the controller image | |
run: make docker-build |