Skip to content

Commit

Permalink
largs partly
Browse files Browse the repository at this point in the history
  • Loading branch information
rvykydal committed Apr 19, 2024
1 parent 246039b commit 2d8556a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/test-os-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Parse launch arguments
id: parse_launch_args
- name: Parse comment arguments
id: parse_comment_args
# Do not use comment body directly in the shell command to avoid possible code injection.
env:
BODY: ${{ github.event.comment.body }}
run: |
# extract first line and cut out the "/test-os-versions" first word
LAUNCH_ARGS=$(echo "$BODY" | sed -n '1 s/^[^ ]* *//p' | sed 's/[[:space:]]*$//')
echo "launch arguments are: $LAUNCH_ARGS"
echo "launch_args=${LAUNCH_ARGS}" >> $GITHUB_OUTPUT
ARGS=$(echo "$BODY" | sed -n '1 s/^[^ ]* *//p' | sed 's/[[:space:]]*$//')
echo "comment arguments are: $ARGS"
echo "comment_args=${ARGS}" >> $GITHUB_OUTPUT
# check for dry run mode
DRY_RUN=False
echo "$BODY" | grep -q "/test-os-versions-dry" && DRY_RUN=True
Expand All @@ -66,8 +66,8 @@ jobs:
allowed_user: ${{ steps.check_user_perm.outputs.allowed_user }}
base_ref: ${{ fromJson(steps.pr_api.outputs.data).base.ref }}
sha: ${{ fromJson(steps.pr_api.outputs.data).head.sha }}
launch_args: ${{ steps.parse_launch_args.outputs.launch_args }}
dry_run: ${{ steps.parse_launch_args.outputs.dry_run }}
comment_args: ${{ steps.parse_comment_args.outputs.comment_args }}
dry_run: ${{ steps.parse_comment_args.outputs.dry_run }}


os-version:
Expand Down

0 comments on commit 2d8556a

Please sign in to comment.