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
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: goversion
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -24,9 +21,11 @@ jobs:
|
|||||||
- linux-s390x
|
- linux-s390x
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- env:
|
- env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
run: |
|
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]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: goversion
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- run: |
|
- run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
7
.github/workflows/coverage.yaml
vendored
7
.github/workflows/coverage.yaml
vendored
@ -3,11 +3,8 @@ name: Coverage
|
|||||||
on: [push]
|
on: [push]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
coverage:
|
coverage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: goversion
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -15,9 +12,11 @@ jobs:
|
|||||||
- linux-amd64-coverage
|
- linux-amd64-coverage
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- env:
|
- env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
run: |
|
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.
|
- cron: '0 1 * * *' # runs daily at 1am.
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
test:
|
test:
|
||||||
# this is to prevent the job to run at forked projects
|
# this is to prevent the job to run at forked projects
|
||||||
if: github.repository == 'etcd-io/etcd'
|
if: github.repository == 'etcd-io/etcd'
|
||||||
runs-on: [self-hosted, Linux, ARM64]
|
runs-on: [self-hosted, Linux, ARM64]
|
||||||
needs: goversion
|
|
||||||
container: golang:1.19-bullseye
|
container: golang:1.19-bullseye
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@ -25,10 +22,11 @@ jobs:
|
|||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||||
# https://github.com/actions/checkout/issues/1169
|
# https://github.com/actions/checkout/issues/1169
|
||||||
- run: git config --system --add safe.directory '*'
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- run: date
|
|
||||||
- env:
|
- env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
|
8
.github/workflows/e2e.yaml
vendored
8
.github/workflows/e2e.yaml
vendored
@ -3,11 +3,8 @@ name: E2E
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
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:
|
||||||
@ -16,10 +13,11 @@ jobs:
|
|||||||
- linux-386-e2e
|
- linux-386-e2e
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- run: date
|
|
||||||
- env:
|
- env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
|
7
.github/workflows/fuzzing.yaml
vendored
7
.github/workflows/fuzzing.yaml
vendored
@ -3,20 +3,19 @@ name: Fuzzing v3rpc
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
fuzzing:
|
fuzzing:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: goversion
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
env:
|
env:
|
||||||
TARGET_PATH: ./server/etcdserver/api/v3rpc
|
TARGET_PATH: ./server/etcdserver/api/v3rpc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- run: |
|
- run: |
|
||||||
set -euo pipefail
|
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]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: goversion
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- run: date
|
- run: date
|
||||||
- run: |
|
- run: |
|
||||||
set -euo pipefail
|
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]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
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:
|
||||||
@ -16,10 +13,11 @@ jobs:
|
|||||||
- linux-amd64-grpcproxy-e2e
|
- linux-amd64-grpcproxy-e2e
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- run: date
|
|
||||||
- env:
|
- env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
|
7
.github/workflows/release.yaml
vendored
7
.github/workflows/release.yaml
vendored
@ -3,16 +3,15 @@ name: Release
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
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
|
||||||
|
@ -23,12 +23,9 @@ on:
|
|||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
test:
|
test:
|
||||||
timeout-minutes: 210
|
timeout-minutes: 210
|
||||||
runs-on: ${{ fromJson(inputs.runs-on) }}
|
runs-on: ${{ fromJson(inputs.runs-on) }}
|
||||||
needs: goversion
|
|
||||||
container: golang:1.19-bullseye
|
container: golang:1.19-bullseye
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@ -37,9 +34,11 @@ jobs:
|
|||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||||
# https://github.com/actions/checkout/issues/1169
|
# https://github.com/actions/checkout/issues/1169
|
||||||
- run: git config --system --add safe.directory '*'
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- name: test-robustness
|
- name: test-robustness
|
||||||
env:
|
env:
|
||||||
ETCD_BRANCH: "${{ inputs.etcdBranch }}"
|
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']"
|
default: "['ubuntu-latest']"
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
test:
|
test:
|
||||||
timeout-minutes: 210
|
timeout-minutes: 210
|
||||||
runs-on: ${{ fromJson(inputs.runs-on) }}
|
runs-on: ${{ fromJson(inputs.runs-on) }}
|
||||||
needs: goversion
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- name: test-robustness
|
- name: test-robustness
|
||||||
env:
|
env:
|
||||||
ETCD_BRANCH: "${{ inputs.etcdBranch }}"
|
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]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
run:
|
run:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: goversion
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@5f1fec7010f6ae3b84ea4f7b2129beb8639b564f # v3.5.0
|
uses: golangci/golangci-lint-action@5f1fec7010f6ae3b84ea4f7b2129beb8639b564f # v3.5.0
|
||||||
with:
|
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.
|
- cron: '30 1 * * *' # runs daily at 1:30 am.
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
jobs:
|
jobs:
|
||||||
goversion:
|
|
||||||
uses: ./.github/workflows/go-version.yaml
|
|
||||||
test:
|
test:
|
||||||
# this is to prevent the job to run at forked projects
|
# this is to prevent the job to run at forked projects
|
||||||
if: github.repository == 'etcd-io/etcd'
|
if: github.repository == 'etcd-io/etcd'
|
||||||
runs-on: [self-hosted, Linux, ARM64]
|
runs-on: [self-hosted, Linux, ARM64]
|
||||||
needs: goversion
|
|
||||||
container: golang:1.19-bullseye
|
container: golang:1.19-bullseye
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@ -28,10 +25,11 @@ jobs:
|
|||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||||
# https://github.com/actions/checkout/issues/1169
|
# https://github.com/actions/checkout/issues/1169
|
||||||
- run: git config --system --add safe.directory '*'
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- run: date
|
|
||||||
- env:
|
- env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
|
8
.github/workflows/tests.yaml
vendored
8
.github/workflows/tests.yaml
vendored
@ -3,11 +3,8 @@ name: Tests
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
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,10 +16,11 @@ jobs:
|
|||||||
- linux-386-unit-1-cpu
|
- linux-386-unit-1-cpu
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
- 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
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.goversion.outputs.goversion }}
|
go-version: ${{ steps.goversion.outputs.goversion }}
|
||||||
- run: date
|
|
||||||
- env:
|
- env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user