Skip to content

Commit

Permalink
Pass Go/Python version as an explicit input
Browse files Browse the repository at this point in the history
  • Loading branch information
webbnh committed Apr 10, 2024
1 parent 429f11e commit 7bb8ae2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/go_lint_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
# a coverage report. (It is only run when invoked by another workflow.)
on:
workflow_call:
env:
go_version: ${{ vars.ARCALOT_GO_VERSION }}
inputs:
go_version:
required: true
type: string
jobs:
golangci-lint:
name: golangci-lint
Expand All @@ -15,7 +17,7 @@ jobs:
- name: Set up Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.go_version }}
go-version: ${{ inputs.go_version }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v4
with:
Expand All @@ -30,7 +32,7 @@ jobs:
- name: Set up Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.go_version }}
go-version: ${{ inputs.go_version }}
- name: Set up gotestfmt
uses: GoTestTools/gotestfmt-action@v2
- uses: actions/cache@v4
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/go_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ on:
for_release:
required: true
type: boolean
env:
go_version: ${{ vars.ARCALOT_GO_VERSION }}
go_version:
required: true
type: string
jobs:
build:
name: build ${{ inputs.for_release && 'release' || 'snapshot' }}
Expand All @@ -26,7 +27,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.go_version }}
go-version: ${{ inputs.go_version }}
- name: Build ${{ inputs.for_release && 'release' || 'snapshot' }}
uses: goreleaser/goreleaser-action@v5
env:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/python_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
# (It is only run when invoked by another workflow.)
on:
workflow_call:
inputs:
python_version:
required: true
type: string
secrets:
PYPI_TOKEN:
required: true
env:
python_version: ${{ vars.ARCALOT_PYTHON_VERSION }}
jobs:
build_python_wheel:
name: build python wheel
Expand All @@ -34,7 +36,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}
python-version: ${{ inputs.python_version }}
architecture: 'x64'
- name: Grab the License file
run: |
Expand Down

0 comments on commit 7bb8ae2

Please sign in to comment.