Skip to content

Update to Go 1.22

Update to Go 1.22 #42

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
branches: [master]
workflow_call:
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Verify dependencies
run: go mod verify
- name: lint
uses: golangci/golangci-lint-action@v6
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.58
- name: Build
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v cmd/clouddriver/clouddriver.go
- name: Test
run: go test -v ./...
env:
GOOGLE_APPLICATION_CREDENTIALS: test/credentials/test-keyfile.json
- uses: actions/upload-artifact@v4
with:
name: build
path: clouddriver