Skip to content

Commit

Permalink
Merge pull request etcd-io#16088 from jmhbnz/backport-gover-simplific…
Browse files Browse the repository at this point in the history
…ation

[3.5]  Backport .github/workflows: Read .go-version as a step and not separate workflow
  • Loading branch information
serathius authored Jun 16, 2023
2 parents cf00c2d + b5f07c9 commit 2c04d51
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 41 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: E2E
on: [push, pull_request]
jobs:
goversion:
uses: ./.github/workflows/go-version.yaml
test:
runs-on: ubuntu-latest
needs: goversion
strategy:
fail-fast: true
matrix:
Expand All @@ -14,9 +11,11 @@ jobs:
- linux-386-e2e
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 }}
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/functional.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: functional-tests
on: [push, pull_request]
jobs:
goversion:
uses: ./.github/workflows/go-version.yaml
test:
runs-on: ubuntu-latest
needs: goversion
strategy:
fail-fast: true
matrix:
target:
- linux-amd64-functional
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 }}
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/go-version.yaml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/grpcproxy.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: grpcProxy-tests
on: [push, pull_request]
jobs:
goversion:
uses: ./.github/workflows/go-version.yaml
test:
runs-on: ubuntu-latest
needs: goversion
strategy:
fail-fast: true
matrix:
target:
- linux-amd64-grpcproxy
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 }}
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: Release
on: [push, pull_request]
jobs:
goversion:
uses: ./.github/workflows/go-version.yaml
main:
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
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -19,9 +16,11 @@ jobs:
- linux-386-unit-1-cpu
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 }}
Expand Down

0 comments on commit 2c04d51

Please sign in to comment.