Skip to content

Commit 494b95d

Browse files
committed
Use env vars for tag prefix option in action
1 parent 7fee956 commit 494b95d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ runs:
1515
using: docker
1616
image: Dockerfile
1717
args:
18-
- >
19-
--changelog ${{ inputs.changelog }}
20-
${{ inputs.tag_prefix ? "--tag-prefix " + inputs.tag_prefix : "--no-tag-prefix" }}
18+
- --changelog ${{ inputs.changelog }}
2119
env:
20+
CR_TAG_PREFIX: ${{ inputs.tag_prefix }}
21+
CR_NO_TAG_PREFIX: ${{ inputs.tag_prefix == "" }}
2222
GITHUB_TOKEN: ${{ inputs.github_token }}

changerelease/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def cli():
2121
type=click.Path(exists=True, file_okay=True, dir_okay=False),
2222
show_default=True,
2323
)
24-
@click.option("--tag-prefix", default="v", show_default=True)
25-
@click.option("--no-tag-prefix", default=False, is_flag=True)
24+
@click.option("--tag-prefix", default="v", show_default=True, envvar="CR_TAG_PREFIX")
25+
@click.option("--no-tag-prefix", default=False, is_flag=True, envvar="CR_NO_TAG_PREFIX")
2626
@click.option("--repo", envvar="GITHUB_REPOSITORY", required=True)
2727
@click.option(
2828
"--api-url",

0 commit comments

Comments
 (0)