Backport .github/workflows: Read .go-version as a step and not separate workflow.

Signed-off-by: James Blair <mail@jamesblair.net>
This commit is contained in:
James Blair
2023-06-16 20:37:38 +12:00
parent cf00c2df8b
commit b5f07c9b7d
6 changed files with 15 additions and 41 deletions

View File

@@ -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:
@@ -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 }}