Merge pull request #16088 from jmhbnz/backport-gover-simplification
[3.5] Backport .github/workflows: Read .go-version as a step and not separate workflow
This commit is contained in:
commit
2c04d51eaa
7
.github/workflows/e2e.yaml
vendored
7
.github/workflows/e2e.yaml
vendored
@ -1,11 +1,8 @@
|
|||||||
name: E2E
|
name: E2E
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: goversion
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
@ -14,9 +11,11 @@ jobs:
|
|||||||
- linux-386-e2e
|
- linux-386-e2e
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- id: goversion
|
||||||
|
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- run: date
|
- run: date
|
||||||
- env:
|
- env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
|
7
.github/workflows/functional.yaml
vendored
7
.github/workflows/functional.yaml
vendored
@ -1,11 +1,8 @@
|
|||||||
name: functional-tests
|
name: functional-tests
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: goversion
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
@ -13,9 +10,11 @@ jobs:
|
|||||||
- linux-amd64-functional
|
- linux-amd64-functional
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- id: goversion
|
||||||
|
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- run: date
|
- run: date
|
||||||
- env:
|
- env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
|
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/grpcproxy.yaml
vendored
7
.github/workflows/grpcproxy.yaml
vendored
@ -1,11 +1,8 @@
|
|||||||
name: grpcProxy-tests
|
name: grpcProxy-tests
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: goversion
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
@ -13,9 +10,11 @@ jobs:
|
|||||||
- linux-amd64-grpcproxy
|
- linux-amd64-grpcproxy
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- id: goversion
|
||||||
|
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- run: date
|
- run: date
|
||||||
- env:
|
- env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
|
7
.github/workflows/release.yaml
vendored
7
.github/workflows/release.yaml
vendored
@ -1,16 +1,15 @@
|
|||||||
name: Release
|
name: Release
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
main:
|
main:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: goversion
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- id: goversion
|
||||||
|
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- name: release
|
- name: release
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
7
.github/workflows/tests.yaml
vendored
7
.github/workflows/tests.yaml
vendored
@ -1,11 +1,8 @@
|
|||||||
name: Tests
|
name: Tests
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: goversion
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -19,9 +16,11 @@ jobs:
|
|||||||
- linux-386-unit-1-cpu
|
- linux-386-unit-1-cpu
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- id: goversion
|
||||||
|
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- run: date
|
- run: date
|
||||||
- env:
|
- env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
|
Loading…
Reference in New Issue
Block a user