Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterize the Go version used in the provider reusable workflows #162

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/provider-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
required: false
type: boolean
default: true
go-version:
description: 'Go version to use if building needs to be done'
default: '1.20'
required: false
type: string
secrets:
UPBOUND_MARKETPLACE_PUSH_ROBOT_USR:
required: true
Expand All @@ -15,7 +20,6 @@ on:

env:
# Common versions
GO_VERSION: '1.20'
GOLANGCI_VERSION: 'v1.54.2'
DOCKER_BUILDX_VERSION: 'v0.8.2'

Expand Down Expand Up @@ -78,7 +82,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
with:
go-version: ${{ env.GO_VERSION }}
go-version: ${{ inputs.go-version }}

- name: Find the Go Build Cache
id: go_cache
Expand Down Expand Up @@ -109,6 +113,7 @@ jobs:
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3
with:
version: ${{ env.GOLANGCI_VERSION }}
args: --timeout=30m

check-diff:
runs-on: ubuntu-22.04
Expand All @@ -124,7 +129,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
with:
go-version: ${{ env.GO_VERSION }}
go-version: ${{ inputs.go-version }}

- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports
Expand Down Expand Up @@ -193,7 +198,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
with:
go-version: ${{ env.GO_VERSION }}
go-version: ${{ inputs.go-version }}

- name: Find the Go Build Cache
id: go_cache
Expand Down Expand Up @@ -244,7 +249,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
with:
go-version: ${{ env.GO_VERSION }}
go-version: ${{ inputs.go-version }}

- name: Find the Go Build Cache
id: go_cache
Expand Down Expand Up @@ -308,7 +313,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
with:
go-version: ${{ env.GO_VERSION }}
go-version: ${{ inputs.go-version }}

- name: Find the Go Build Cache
id: go_cache
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/provider-publish-service-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ on:
default: ''
required: false
type: string
go-version:
description: 'Go version to use if building needs to be done'
default: '1.20'
required: false
type: string
secrets:
UPBOUND_MARKETPLACE_PUSH_ROBOT_USR:
required: true
Expand All @@ -41,7 +46,6 @@ on:

env:
# Common versions
GO_VERSION: '1.20'
GOLANGCI_VERSION: 'v1.54.2'
DOCKER_BUILDX_VERSION: 'v0.8.2'
UP_VERSION: 'v0.17.0'
Expand Down Expand Up @@ -100,7 +104,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
with:
go-version: ${{ env.GO_VERSION }}
go-version: ${{ inputs.go-version }}

- name: Find the Go Build Cache
id: go_cache
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/provider-updoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ on:
default: 'monolith'
required: false
type: string
go-version:
description: 'Go version to use if building needs to be done'
default: '1.20'
required: false
type: string
secrets:
UPBOUND_CI_PROD_BUCKET_SA:
required: true

env:
GO_VERSION: "1.20"
UPTEST_VERSION: "83bd901"

jobs:
Expand All @@ -28,7 +32,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
with:
go-version: ${{ env.GO_VERSION }}
go-version: ${{ inputs.go-version }}

- name: Find Go Caches
id: go
Expand Down
Loading