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

ci: use go version in go.mod file #350

Merged
merged 1 commit into from
Sep 6, 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
5 changes: 1 addition & 4 deletions .github/e2e-tests-olm/action.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: e2e-tests-olm
description: Runs E2E tests against the OLM bundle
inputs:
go-version:
description: "go version"
required: true
kind-version:
description: "kind version"
required: false
Expand All @@ -18,7 +15,7 @@ runs:
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ inputs.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand Down
1 change: 0 additions & 1 deletion .github/env

This file was deleted.

5 changes: 1 addition & 4 deletions .github/olm-publish/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ inputs:
quay_token:
description: "Quay token"
required: true
go-version:
description: "go version"
required: true
runs:
using: composite
steps:
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ${{ inputs.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand Down
5 changes: 1 addition & 4 deletions .github/osd-test-harness-publish/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ inputs:
quay_token:
description: "Quay token"
required: true
go-version:
description: "go version"
required: true
runs:
using: composite
steps:
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ${{ inputs.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand Down
5 changes: 1 addition & 4 deletions .github/package-operator-publish/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ inputs:
quay_token:
description: "Quay token"
required: true
go-version:
description: "go version"
required: true
runs:
using: composite
steps:
Expand All @@ -20,7 +17,7 @@ runs:
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ${{ inputs.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand Down
25 changes: 4 additions & 21 deletions .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

- uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand All @@ -54,12 +51,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

- uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand All @@ -73,12 +67,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

- uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand All @@ -92,13 +83,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand All @@ -113,10 +101,5 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: e2e tests through OLM
uses: ./.github/e2e-tests-olm
with:
go-version: ${{ env.go-version }}
25 changes: 3 additions & 22 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: e2e tests through OLM
uses: ./.github/e2e-tests-olm
with:
go-version: ${{ env.go-version }}

publish-olm-development:
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
Expand All @@ -29,17 +24,14 @@ jobs:
with:
fetch-depth: 0

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

# Bumping the version in the next step will also run code generation scripts
# that depend on controller-gen.
# Therefore, we first need to setup Go so that we can install the
# controller-gen binary.
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand All @@ -60,7 +52,6 @@ jobs:
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}

- name: Push catalog index changes
uses: ad-m/github-push-action@master
Expand All @@ -76,7 +67,6 @@ jobs:
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}

create-github-prerelease:
needs:
Expand All @@ -90,17 +80,14 @@ jobs:
fetch-depth: 0
token: ${{ secrets.REPOSITORY_PUSH_TOKEN }}

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

# Bumping the version in the next step will also run code generation scripts
# that depend on controller-gen.
# Therefore, we first need to setup Go so that we can install the
# controller-gen binary.
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand Down Expand Up @@ -141,13 +128,10 @@ jobs:
fetch-depth: 0
token: ${{ secrets.REPOSITORY_PUSH_TOKEN }}

- name: Import common environment variables
run: cat ".github/env" >> "$GITHUB_ENV"

- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand All @@ -168,7 +152,6 @@ jobs:
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}

- name: Push catalog index changes
uses: ad-m/github-push-action@master
Expand All @@ -184,7 +167,6 @@ jobs:
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}

- name: Publish test harness
uses: ./.github/osd-test-harness-publish
Expand All @@ -194,4 +176,3 @@ jobs:
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}