Skip to content

Commit

Permalink
refactor: extract env variable for go version
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed May 4, 2023
1 parent ea68094 commit 9a98172
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ name: Tests / Code Coverage
on:
workflow_call:

env:
GO_VERSION: '1.20'

concurrency:
# do not cancel jobs from earlier commits for tags or the main branch
group: ${{ github.workflow }}-${{ !startsWith(github.ref, 'refs/tags/') &&
Expand All @@ -18,7 +21,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: ${{ env.GO_VERSION }}
- name: Display go version
run: go version
- name: install tparse
Expand All @@ -37,7 +40,7 @@ jobs:
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v4
# with:
# go-version: 1.20
# go-version: ${{ env.GO_VERSION }}
# - name: Display go version
# run: go version
# - uses: technote-space/get-diff-action@v6.1.2
Expand Down Expand Up @@ -90,7 +93,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.20
go-version: ${{ env.GO_VERSION }}
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
Expand Down Expand Up @@ -173,7 +176,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.20
go-version: ${{ env.GO_VERSION }}
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
Expand Down Expand Up @@ -241,7 +244,7 @@ jobs:
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v4
# with:
# go-version: 1.20
# go-version: ${{ env.GO_VERSION }}
# - uses: technote-space/get-diff-action@v6.1.2
# id: git_diff
# with:
Expand Down

0 comments on commit 9a98172

Please sign in to comment.