Skip to content

Commit

Permalink
workflows/csi_wrapper_images: get go version from versions.yaml
Browse files Browse the repository at this point in the history
Changed the workflow to remove the hard-coded go version, instead it
will get from versions.yaml. Because currently we are building against
one single go version, it could be removed the matrix configuration
entirely.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
  • Loading branch information
wainersm committed Sep 12, 2023
1 parent f75bb90 commit c19ec0f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/csi_wrapper_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ on:
- 'volumes/csi-wrapper/**'
workflow_dispatch:

env:
go_version: "1.20.8"

jobs:
build_push_job:
name: build and push
Expand All @@ -32,10 +29,15 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Golang version ${{ env.go_version }}
- 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 }}
go-version: ${{ env.GO_VERSION }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to quay Container Registry
Expand Down

0 comments on commit c19ec0f

Please sign in to comment.