diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index de637a2e9..a041c5ca9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,11 +4,8 @@ on: [push, pull_request] permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml build: runs-on: ubuntu-latest - needs: goversion strategy: fail-fast: false matrix: @@ -24,9 +21,11 @@ jobs: - linux-s390x steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} + go-version: ${{ steps.goversion.outputs.goversion }} - env: TARGET: ${{ matrix.target }} run: | diff --git a/.github/workflows/contrib.yaml b/.github/workflows/contrib.yaml index 24df887ea..22741e3e9 100644 --- a/.github/workflows/contrib.yaml +++ b/.github/workflows/contrib.yaml @@ -3,16 +3,15 @@ name: Test contrib/mixin on: [push, pull_request] permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml test: runs-on: ubuntu-latest - needs: goversion steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} + go-version: ${{ steps.goversion.outputs.goversion }} - run: | set -euo pipefail diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 298668e72..0abb8bb93 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -3,11 +3,8 @@ name: Coverage on: [push] permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml coverage: runs-on: ubuntu-latest - needs: goversion strategy: fail-fast: false matrix: @@ -15,9 +12,11 @@ jobs: - linux-amd64-coverage steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} + go-version: ${{ steps.goversion.outputs.goversion }} - env: TARGET: ${{ matrix.target }} run: | diff --git a/.github/workflows/e2e-arm64.yaml b/.github/workflows/e2e-arm64.yaml index 85e8a1891..c6539b603 100644 --- a/.github/workflows/e2e-arm64.yaml +++ b/.github/workflows/e2e-arm64.yaml @@ -5,13 +5,10 @@ on: - cron: '0 1 * * *' # runs daily at 1am. permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml test: # this is to prevent the job to run at forked projects if: github.repository == 'etcd-io/etcd' runs-on: [self-hosted, Linux, ARM64] - needs: goversion container: golang:1.19-bullseye defaults: run: @@ -25,10 +22,11 @@ jobs: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # https://github.com/actions/checkout/issues/1169 - run: git config --system --add safe.directory '*' + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} - - run: date + go-version: ${{ steps.goversion.outputs.goversion }} - env: TARGET: ${{ matrix.target }} run: | diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index ec7750819..bbf31b687 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -3,11 +3,8 @@ name: E2E on: [push, pull_request] permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml test: runs-on: ubuntu-latest - needs: goversion strategy: fail-fast: true matrix: @@ -16,10 +13,11 @@ jobs: - linux-386-e2e steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} - - run: date + go-version: ${{ steps.goversion.outputs.goversion }} - env: TARGET: ${{ matrix.target }} run: | diff --git a/.github/workflows/fuzzing.yaml b/.github/workflows/fuzzing.yaml index 7fa3d8a15..e6042b8fb 100644 --- a/.github/workflows/fuzzing.yaml +++ b/.github/workflows/fuzzing.yaml @@ -3,20 +3,19 @@ name: Fuzzing v3rpc on: [push, pull_request] permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml fuzzing: runs-on: ubuntu-latest - needs: goversion strategy: fail-fast: false env: TARGET_PATH: ./server/etcdserver/api/v3rpc steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} + go-version: ${{ steps.goversion.outputs.goversion }} - run: | set -euo pipefail diff --git a/.github/workflows/go-version.yaml b/.github/workflows/go-version.yaml deleted file mode 100644 index ff4d3ba8a..000000000 --- a/.github/workflows/go-version.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Go version setup -permissions: read-all - -on: - workflow_call: - outputs: - goversion: - value: ${{ jobs.version.outputs.goversion }} - -jobs: - version: - name: Set Go version variable for all the workflows - runs-on: ubuntu-latest - outputs: - goversion: ${{ steps.goversion.outputs.goversion }} - steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - - id: goversion - run: | - GO_VERSION=$(cat .go-version) - echo "Go Version: $GO_VERSION" - echo "goversion=$GO_VERSION" >> $GITHUB_OUTPUT diff --git a/.github/workflows/govuln.yaml b/.github/workflows/govuln.yaml index 8ce995e41..ebf0281e7 100644 --- a/.github/workflows/govuln.yaml +++ b/.github/workflows/govuln.yaml @@ -3,16 +3,15 @@ name: Go Vulnerability Checker on: [push, pull_request] permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml test: runs-on: ubuntu-latest - needs: goversion steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} + go-version: ${{ steps.goversion.outputs.goversion }} - run: date - run: | set -euo pipefail diff --git a/.github/workflows/grpcproxy.yaml b/.github/workflows/grpcproxy.yaml index 6c7cdced3..cc7222aac 100644 --- a/.github/workflows/grpcproxy.yaml +++ b/.github/workflows/grpcproxy.yaml @@ -3,11 +3,8 @@ name: grpcProxy-tests on: [push, pull_request] permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml test: runs-on: ubuntu-latest - needs: goversion strategy: fail-fast: true matrix: @@ -16,10 +13,11 @@ jobs: - linux-amd64-grpcproxy-e2e steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} - - run: date + go-version: ${{ steps.goversion.outputs.goversion }} - env: TARGET: ${{ matrix.target }} run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1d2e3f380..bd244e7c6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,16 +3,15 @@ name: Release on: [push, pull_request] permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml main: runs-on: ubuntu-latest - needs: goversion steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} + go-version: ${{ steps.goversion.outputs.goversion }} - name: release run: | set -euo pipefail diff --git a/.github/workflows/robustness-template-arm64.yaml b/.github/workflows/robustness-template-arm64.yaml index 6a958a473..8df4ac7e6 100644 --- a/.github/workflows/robustness-template-arm64.yaml +++ b/.github/workflows/robustness-template-arm64.yaml @@ -23,12 +23,9 @@ on: permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml test: timeout-minutes: 210 runs-on: ${{ fromJson(inputs.runs-on) }} - needs: goversion container: golang:1.19-bullseye defaults: run: @@ -37,9 +34,11 @@ jobs: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # https://github.com/actions/checkout/issues/1169 - run: git config --system --add safe.directory '*' + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} + go-version: ${{ steps.goversion.outputs.goversion }} - name: test-robustness env: ETCD_BRANCH: "${{ inputs.etcdBranch }}" diff --git a/.github/workflows/robustness-template.yaml b/.github/workflows/robustness-template.yaml index 2af1900c5..a15350f94 100644 --- a/.github/workflows/robustness-template.yaml +++ b/.github/workflows/robustness-template.yaml @@ -22,17 +22,16 @@ on: default: "['ubuntu-latest']" permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml test: timeout-minutes: 210 runs-on: ${{ fromJson(inputs.runs-on) }} - needs: goversion steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} + go-version: ${{ steps.goversion.outputs.goversion }} - name: test-robustness env: ETCD_BRANCH: "${{ inputs.etcdBranch }}" diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml index af4753b0b..05d35e1db 100644 --- a/.github/workflows/static-analysis.yaml +++ b/.github/workflows/static-analysis.yaml @@ -3,16 +3,15 @@ name: Static Analysis on: [push, pull_request] permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml run: runs-on: ubuntu-latest - needs: goversion steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} + go-version: ${{ steps.goversion.outputs.goversion }} - name: golangci-lint uses: golangci/golangci-lint-action@5f1fec7010f6ae3b84ea4f7b2129beb8639b564f # v3.5.0 with: diff --git a/.github/workflows/tests-arm64.yaml b/.github/workflows/tests-arm64.yaml index 704e838ba..30dfe2375 100644 --- a/.github/workflows/tests-arm64.yaml +++ b/.github/workflows/tests-arm64.yaml @@ -5,13 +5,10 @@ on: - cron: '30 1 * * *' # runs daily at 1:30 am. permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml test: # this is to prevent the job to run at forked projects if: github.repository == 'etcd-io/etcd' runs-on: [self-hosted, Linux, ARM64] - needs: goversion container: golang:1.19-bullseye defaults: run: @@ -28,10 +25,11 @@ jobs: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # https://github.com/actions/checkout/issues/1169 - run: git config --system --add safe.directory '*' + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} - - run: date + go-version: ${{ steps.goversion.outputs.goversion }} - env: TARGET: ${{ matrix.target }} run: | diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e91bdaad9..705e53a80 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -3,11 +3,8 @@ name: Tests on: [push, pull_request] permissions: read-all jobs: - goversion: - uses: ./.github/workflows/go-version.yaml test: runs-on: ubuntu-latest - needs: goversion strategy: fail-fast: false matrix: @@ -19,10 +16,11 @@ jobs: - linux-386-unit-1-cpu steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - go-version: ${{ needs.goversion.outputs.goversion }} - - run: date + go-version: ${{ steps.goversion.outputs.goversion }} - env: TARGET: ${{ matrix.target }} run: |