diff --git a/.github/e2e-tests-olm/action.yaml b/.github/e2e-tests-olm/action.yaml index 6cbca9bab..fd125449d 100644 --- a/.github/e2e-tests-olm/action.yaml +++ b/.github/e2e-tests-olm/action.yaml @@ -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 @@ -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 diff --git a/.github/env b/.github/env deleted file mode 100644 index 9a820d47a..000000000 --- a/.github/env +++ /dev/null @@ -1 +0,0 @@ -go-version=1.20 diff --git a/.github/olm-publish/action.yaml b/.github/olm-publish/action.yaml index 2709344ae..bc0b759b8 100644 --- a/.github/olm-publish/action.yaml +++ b/.github/olm-publish/action.yaml @@ -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 diff --git a/.github/package-operator-publish/action.yaml b/.github/package-operator-publish/action.yaml index bc4a87c24..bdad3fa25 100644 --- a/.github/package-operator-publish/action.yaml +++ b/.github/package-operator-publish/action.yaml @@ -7,9 +7,6 @@ inputs: quay_token: description: "Quay token" required: true - go-version: - description: "go version" - required: true runs: using: composite steps: @@ -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 diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index 82bc1311b..fb9a926c7 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 49dd24950..e7206c5ce 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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):')" @@ -29,9 +24,6 @@ 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 @@ -39,7 +31,7 @@ jobs: - 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 @@ -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 @@ -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: @@ -90,9 +80,6 @@ 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 @@ -100,7 +87,7 @@ jobs: - 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 @@ -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 @@ -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 @@ -184,4 +167,3 @@ jobs: with: quay_login: ${{ secrets.QUAY_LOGIN }} quay_token: ${{ secrets.QUAY_TOKEN }} - go-version: ${{ env.go-version }}