Skip to content

Commit

Permalink
Merge pull request #162 from ulucinar/parameterize-go-version
Browse files Browse the repository at this point in the history
Parameterize the Go version used in the provider reusable workflows
  • Loading branch information
ulucinar authored Nov 15, 2023
2 parents d5e5cb8 + 6d8836e commit 6b7ee06
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
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

0 comments on commit 6b7ee06

Please sign in to comment.