Skip to content

Commit

Permalink
Problem: minor security issue in github workflow (#1056)
Browse files Browse the repository at this point in the history
* Problem: minor security issue in github workflow

* Update .github/workflows/build.yml

Signed-off-by: yihuang <huang@crypto.com>

---------

Signed-off-by: yihuang <huang@crypto.com>
  • Loading branch information
yihuang authored Jul 8, 2024
1 parent 61974a9 commit b6afee3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ jobs:
- name: Get Comment PR informations
id: pr_data
if: github.event_name == 'issue_comment'
env:
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
echo "repo_name=${{ fromJson(steps.request.outputs.data).head.repo.full_name }}" >> $GITHUB_OUTPUT
comment_hash=`echo ${{ github.event.comment.body }} | cut -d' ' -f2` # get commit hash if any
comment_hash=`echo "$COMMENT_BODY" | cut -d' ' -f2` # get commit hash if any
if [[ "${comment_hash}" == "/runsim" ]]; then
# use default head ref
echo "ref=${{ fromJson(steps.request.outputs.data).head.ref }}" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit b6afee3

Please sign in to comment.