Skip to content

Commit 967d737

Browse files
Merge pull request #1 from fineguy/main
Add git ref input
2 parents 8f4fe8e + 6be1fd3 commit 967d737

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ You can also chain this job with your unittests to only trigger release if tests
4444
* `parse-changelog`: If `true`, extract GitHub release notes from the `CHANGELOG.md` (assuming [keep a changelog
4545
](https://keepachangelog.com/) format)
4646
* `pkg-name` (Optional): Package name (auto-detected).
47+
* `git-ref` (Optional): Git ref (e.g. SHA or tag). If `git-ref: skip`, the repository is
48+
not checked out (this can be used to manually checkout and update the repo before publishing).
4749

4850
## Outputs
4951

action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,18 @@ inputs:
2121
pkg-name:
2222
description: 'Name of the PyPI package (optional).'
2323
required: false
24+
git-ref:
25+
description: 'Git ref (e.g. SHA or tag) (optional).'
26+
required: false
27+
default: '' # Use 'skip' to skip repository checkout
2428

2529
runs:
2630
using: "composite"
2731
steps:
28-
- uses: actions/checkout@v3
32+
- if: inputs.git-ref != 'skip'
33+
uses: actions/checkout@v3
34+
with:
35+
ref: ${{ inputs.git-ref }}
2936

3037
# Setup Python
3138
- uses: actions/setup-python@v4

0 commit comments

Comments
 (0)