Skip to content

Commit 241a322

Browse files
committed
Refactor category determination step to use the $GITHUB_OUTPUT environment file instead of deprecated set-output
1 parent 08b8e6d commit 241a322

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/issue_to_pr.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,19 @@ jobs:
3737

3838
- name: Determine category from labels
3939
id: determineCategory
40-
run: echo "::set-output name=category::${{
41-
contains(github.event.issue.labels.*.name, 'examples') && 'examples'
42-
|| contains(github.event.issue.labels.*.name, 'mode') && 'mode'
43-
|| contains(github.event.issue.labels.*.name, 'tool') && 'tool'
44-
|| contains(github.event.issue.labels.*.name, 'library') && 'library'}}"
40+
run: |
41+
category=$(
42+
if [[ $(echo "${{ github.event.issue.labels.*.name }}" | grep -q 'examples') ]]; then
43+
echo 'examples'
44+
elif [[ $(echo "${{ github.event.issue.labels.*.name }}" | grep -q 'mode') ]]; then
45+
echo 'mode'
46+
elif [[ $(echo "${{ github.event.issue.labels.*.name }}" | grep -q 'tool') ]]; then
47+
echo 'tool'
48+
elif [[ $(echo "${{ github.event.issue.labels.*.name }}" | grep -q 'library') ]]; then
49+
echo 'library'
50+
fi
51+
)
52+
echo "category=$category" >> $GITHUB_OUTPUT
4553
4654
- name: Validate properties URL
4755
id: validateUrl

0 commit comments

Comments
 (0)