Skip to content

Commit

Permalink
Pass tag to workflow call (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiran committed Aug 8, 2022
1 parent 20191db commit d802555
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ on:
pull_request:
branches: [ "main", "v*" ]
workflow_dispatch:
inputs:
tag:
description: tag to build
required: false
type: string
workflow_call:
inputs:
tag:
description: tag to build
required: true
type: string

permissions:
contents: read
Expand Down Expand Up @@ -35,6 +45,8 @@ jobs:
- "pypy-3.9"
steps:
- uses: "actions/checkout@v3"
with:
ref: ${{ inputs.tag || github.ref }}
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
Expand All @@ -52,6 +64,8 @@ jobs:
needs: tests
steps:
- uses: "actions/checkout@v3"
with:
ref: ${{ inputs.tag || github.ref }}
- uses: "actions/setup-python@v4"
with:
python-version: "3.10"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ on:
jobs:
tests:
uses: ./.github/workflows/main.yml
with:
tag: ${{ inputs.tag }}
pypi:
name: Build and upload to PyPI
runs-on: ubuntu-latest
Expand Down

0 comments on commit d802555

Please sign in to comment.