Update Go setup for GitHub Actions workflows (#444)

This commit is contained in:
Moulick Aggarwal
2023-05-24 10:10:17 +02:00
committed by GitHub
parent b6e6c17df4
commit 385b3c7684
3 changed files with 19 additions and 21 deletions

View File

@@ -7,31 +7,31 @@ on:
env:
DOCKER_FILE_PATH: Dockerfile
GOLANG_VERSION: 1.20.3
KUBERNETES_VERSION: "1.18.0"
KIND_VERSION: "0.10.0"
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
name: Build
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Check out code
uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.sha}}
# Setting up helm binary
- name: Set up Helm
uses: azure/setup-helm@v3
- name: Set up Go
id: go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ env.GOLANG_VERSION }}
go-version-file: 'go.mod'
check-latest: true
cache: true
- name: Install Dependencies
run: |
@@ -70,7 +70,7 @@ jobs:
run: |
kind create cluster
kubectl cluster-info
- name: Test
run: make test
@@ -80,7 +80,7 @@ jobs:
sha=${{ github.event.pull_request.head.sha }}
tag="SNAPSHOT-PR-${{ github.event.pull_request.number }}-${sha:0:8}"
echo "##[set-output name=GIT_TAG;]$(echo ${tag})"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2