mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
.github/workflows: Read .go-version as a step and not separate workflow
Signed-off-by: Marek Siarkowicz <serathius@users.noreply.github.com>
This commit is contained in:
parent
a708bed336
commit
eb56d86e40
7
.github/workflows/build.yaml
vendored
7
.github/workflows/build.yaml
vendored
@ -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: |
|
||||
|
7
.github/workflows/contrib.yaml
vendored
7
.github/workflows/contrib.yaml
vendored
@ -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
|
||||
|
||||
|
7
.github/workflows/coverage.yaml
vendored
7
.github/workflows/coverage.yaml
vendored
@ -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: |
|
||||
|
8
.github/workflows/e2e-arm64.yaml
vendored
8
.github/workflows/e2e-arm64.yaml
vendored
@ -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: |
|
||||
|
8
.github/workflows/e2e.yaml
vendored
8
.github/workflows/e2e.yaml
vendored
@ -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: |
|
||||
|
7
.github/workflows/fuzzing.yaml
vendored
7
.github/workflows/fuzzing.yaml
vendored
@ -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
|
||||
|
||||
|
23
.github/workflows/go-version.yaml
vendored
23
.github/workflows/go-version.yaml
vendored
@ -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
|
7
.github/workflows/govuln.yaml
vendored
7
.github/workflows/govuln.yaml
vendored
@ -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
|
||||
|
8
.github/workflows/grpcproxy.yaml
vendored
8
.github/workflows/grpcproxy.yaml
vendored
@ -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: |
|
||||
|
7
.github/workflows/release.yaml
vendored
7
.github/workflows/release.yaml
vendored
@ -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
|
||||
|
@ -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 }}"
|
||||
|
7
.github/workflows/robustness-template.yaml
vendored
7
.github/workflows/robustness-template.yaml
vendored
@ -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 }}"
|
||||
|
7
.github/workflows/static-analysis.yaml
vendored
7
.github/workflows/static-analysis.yaml
vendored
@ -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:
|
||||
|
8
.github/workflows/tests-arm64.yaml
vendored
8
.github/workflows/tests-arm64.yaml
vendored
@ -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: |
|
||||
|
8
.github/workflows/tests.yaml
vendored
8
.github/workflows/tests.yaml
vendored
@ -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: |
|
||||
|
Loading…
x
Reference in New Issue
Block a user