Skip to content

Commit d802555

Browse files
authored
Pass tag to workflow call (#7)
1 parent 20191db commit d802555

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ on:
77
pull_request:
88
branches: [ "main", "v*" ]
99
workflow_dispatch:
10+
inputs:
11+
tag:
12+
description: tag to build
13+
required: false
14+
type: string
1015
workflow_call:
16+
inputs:
17+
tag:
18+
description: tag to build
19+
required: true
20+
type: string
1121

1222
permissions:
1323
contents: read
@@ -35,6 +45,8 @@ jobs:
3545
- "pypy-3.9"
3646
steps:
3747
- uses: "actions/checkout@v3"
48+
with:
49+
ref: ${{ inputs.tag || github.ref }}
3850
- uses: "actions/setup-python@v4"
3951
with:
4052
python-version: "${{ matrix.python-version }}"
@@ -52,6 +64,8 @@ jobs:
5264
needs: tests
5365
steps:
5466
- uses: "actions/checkout@v3"
67+
with:
68+
ref: ${{ inputs.tag || github.ref }}
5569
- uses: "actions/setup-python@v4"
5670
with:
5771
python-version: "3.10"

.github/workflows/pypi.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ on:
2323
jobs:
2424
tests:
2525
uses: ./.github/workflows/main.yml
26+
with:
27+
tag: ${{ inputs.tag }}
2628
pypi:
2729
name: Build and upload to PyPI
2830
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)