mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #16089 from jmhbnz/release-3.4
[3.4] Backport .github/workflows: Read .go-version as a step and not separate workflow
This commit is contained in:
commit
a8d4009a94
21
.github/workflows/go-version.yaml
vendored
21
.github/workflows/go-version.yaml
vendored
@ -1,21 +0,0 @@
|
||||
name: Go version setup
|
||||
|
||||
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/release.yaml
vendored
7
.github/workflows/release.yaml
vendored
@ -1,16 +1,15 @@
|
||||
name: Release
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
goversion:
|
||||
uses: ./.github/workflows/go-version.yaml
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: goversion
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- id: goversion
|
||||
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
||||
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||
- name: release
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
7
.github/workflows/tests.yaml
vendored
7
.github/workflows/tests.yaml
vendored
@ -1,11 +1,8 @@
|
||||
name: Tests
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
goversion:
|
||||
uses: ./.github/workflows/go-version.yaml
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: goversion
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@ -22,9 +19,11 @@ jobs:
|
||||
- linux-386-unit
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- id: goversion
|
||||
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
||||
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||
- run: date
|
||||
- env:
|
||||
TARGET: ${{ matrix.target }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user