Skip to content

Commit 351a64e

Browse files
committed
Fix workflow interpolation safety
1 parent e502cae commit 351a64e

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/label-bug-report.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ jobs:
1414
steps:
1515
- name: Check if issue is a "🐛 Bug report"
1616
id: check_is_bug_report
17+
env:
18+
issue_title: "${{ github.event.issue.title }}"
1719
run: |
1820
echo "## Checking if issue is a 'Feature idea'..."
19-
if [[ "${{ github.event.issue.title }}" == "🐛 "* ]]; then
21+
if [[ "$issue_title" == "🐛 "* ]]; then
2022
echo "is_bug_report=true" >> $GITHUB_ENV
2123
else
2224
echo "is_bug_report=false" >> $GITHUB_ENV

.github/workflows/label-feature-issue.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ jobs:
1414
steps:
1515
- name: Check if issue is a "💡 Feature idea"
1616
id: check_is_feature_idea
17+
env:
18+
issue_title: "${{ github.event.issue.title }}"
1719
run: |
1820
echo "## Checking if issue is a 'Feature idea'..."
19-
if [[ "${{ github.event.issue.title }}" == "💡 "* ]]; then
21+
if [[ "$issue_title" == "💡 "* ]]; then
2022
echo "is_feature_idea=true" >> $GITHUB_ENV
2123
else
2224
echo "is_feature_idea=false" >> $GITHUB_ENV
@@ -89,4 +91,4 @@ jobs:
8991
repo: context.repo.repo,
9092
labels: ["User Story Needed"],
9193
});
92-
}
94+
}

.github/workflows/update-govtool-version.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
jobs:
1111
update-version:
1212
runs-on: ubuntu-latest
13+
env:
14+
VERSION: "${{ github.event.inputs.version }}"
1315

1416
steps:
1517
- name: Checkout Repository
@@ -24,9 +26,6 @@ jobs:
2426
node-version-file: "./govtool/frontend/.nvmrc"
2527
scope: "@intersect.mbo"
2628

27-
- name: Set Version Variable
28-
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
29-
3029
- name: Update package.json files and install dependencies
3130
run: |
3231
jq --arg v "$VERSION" '.version = $v' govtool/frontend/package.json > temp.json && mv temp.json govtool/frontend/package.json
@@ -55,7 +54,7 @@ jobs:
5554
- name: Update CHANGELOG.md
5655
run: |
5756
#!/bin/bash
58-
VERSION="${{ github.event.inputs.version }}"
57+
VERSION="$VERSION"
5958
TODAY=$(date +%Y-%m-%d)
6059
RELEASE_TAG="v$VERSION"
6160
RELEASE_LINK="[v$VERSION](https://github.com/IntersectMBO/govtool/releases/tag/$RELEASE_TAG)"

0 commit comments

Comments
 (0)