Skip to content

Commit fb1ae8e

Browse files
authored
ci: fix zizmor template-injection warning (#373)
1 parent e652d76 commit fb1ae8e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/release-plz.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,15 @@ jobs:
3232
if: ${{ steps.release-plz.outputs.prs_created }}
3333
env:
3434
GH_TOKEN: ${{ secrets.OXC_BOT_PAT }}
35+
PR_NUMBER: ${{ fromJSON(steps.release-plz.outputs.pr).number }}
36+
VERSION: ${{ fromJSON(steps.release-plz.outputs.pr).releases[0].version }}
3537
run: |
3638
set -e
37-
38-
pr_number=${{ fromJSON(steps.release-plz.outputs.pr).number }}
39-
if [[ -n "$pr_number" ]]; then
40-
version=${{ fromJSON(steps.release-plz.outputs.pr).releases[0].version }}
41-
echo "version: $version"
42-
43-
jq --arg version "${version}" '.version = ($version)' npm/package.json > tmp
39+
if [[ -n "$PR_NUMBER" ]]; then
40+
jq --arg version "${VERSION}" '.version = ($VERSION)' npm/package.json > tmp
4441
mv tmp npm/package.json
4542
46-
gh pr checkout $pr_number
43+
gh pr checkout $PR_NUMBER
4744
git add .
4845
git commit --amend --no-edit
4946
git push --force-with-lease

0 commit comments

Comments
 (0)