From b6b11bb4f5e5a53041e555169abd71d7c1543ec4 Mon Sep 17 00:00:00 2001 From: Jan Fajerski Date: Wed, 6 Sep 2023 09:14:54 +0200 Subject: [PATCH] build: build and publish test harness images in release workflow (#341) (#350) Signed-off-by: Jan Fajerski --- .github/e2e-tests-olm/action.yaml | 5 +--- .github/env | 1 - .github/olm-publish/action.yaml | 5 +--- .github/osd-test-harness-publish/action.yaml | 5 +--- .github/package-operator-publish/action.yaml | 5 +--- .github/workflows/pr-checks.yaml | 25 ++++---------------- .github/workflows/release.yaml | 25 +++----------------- 7 files changed, 11 insertions(+), 60 deletions(-) delete mode 100644 .github/env diff --git a/.github/e2e-tests-olm/action.yaml b/.github/e2e-tests-olm/action.yaml index 6cbca9ba..fd125449 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 9a820d47..00000000 --- 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 2709344a..bc0b759b 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/osd-test-harness-publish/action.yaml b/.github/osd-test-harness-publish/action.yaml index 88f72470..817560ff 100644 --- a/.github/osd-test-harness-publish/action.yaml +++ b/.github/osd-test-harness-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 bc4a87c2..bdad3fa2 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 38700249..2de77039 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -24,12 +24,9 @@ jobs: steps: - uses: actions/checkout@v4 - - 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@v4 - - 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@v4 - - 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@v4 - - 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@v4 - - 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 c18da4d1..4b0c460b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,13 +10,8 @@ jobs: steps: - uses: actions/checkout@v4 - - 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 }} - name: Publish test harness uses: ./.github/osd-test-harness-publish @@ -100,9 +90,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 @@ -110,7 +97,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 @@ -151,13 +138,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 @@ -178,7 +162,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 @@ -194,7 +177,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 @@ -204,4 +186,3 @@ jobs: with: quay_login: ${{ secrets.QUAY_LOGIN }} quay_token: ${{ secrets.QUAY_TOKEN }} - go-version: ${{ env.go-version }}