From 7681c412c4f819d557c0569d02b85effb06eed89 Mon Sep 17 00:00:00 2001 From: Kartik Joshi Date: Wed, 11 Oct 2023 13:02:42 +0530 Subject: [PATCH] Azure: Use versions.yaml to read go version in e2e test Use versions.yaml to read go version in e2e test Fixes: #1496 Signed-off-by: Kartik Joshi --- .github/workflows/azure-e2e-test.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/azure-e2e-test.yml b/.github/workflows/azure-e2e-test.yml index 01e2fd8e0f..7ad529db40 100644 --- a/.github/workflows/azure-e2e-test.yml +++ b/.github/workflows/azure-e2e-test.yml @@ -31,6 +31,17 @@ jobs: echo "Generated unique version for the image as: ${unique_version}" echo "image-version=${unique_version}" >> "$GITHUB_OUTPUT" + read-properties: + runs-on: ubuntu-latest + steps: + - 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" + build-podvm-image: uses: confidential-containers/cloud-api-adaptor/.github/workflows/azure-podvm-image-build.yml@main needs: @@ -51,8 +62,9 @@ jobs: - name: Set up Go environment uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: ${{ env.GO_VERSION }} cache-dependency-path: go.sum + run: echo ${{ env.GO_VERSION }} - uses: azure/login@v1 name: 'Az CLI login' @@ -96,7 +108,7 @@ jobs: - name: Set up Go environment uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: ${{ env.GO_VERSION }} - name: Create provisioner file env: