Skip to content

Commit 2aad0c5

Browse files
committed
fix(ci): fix githubactions:S7630 flagged by sonarcloud
Signed-off-by: Keith Wall <kwall@apache.org>
1 parent 73147da commit 2aad0c5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/robot-command-dispatcher.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ jobs:
4848
gh issue comment ${{ github.event.issue.number }} --body "${{ github.actor }} is not entitled to use <code>&commat;kroxylicious-robot</code>. The user must be a member of release-engineers)"
4949
exit -1
5050
51-
- name: 'Extract command'
51+
- name: 'Extract command from comment'
52+
env:
53+
COMMENT_BODY: ${{ github.event.comment.body }}
5254
run: |
53-
COMMAND=$(echo "${{ github.event.comment.body }}" | awk '/^@kroxylicious-robot/ {print $2}')
55+
COMMAND=$(echo "${COMMENT_BODY}" | awk '/^@kroxylicious-robot/ {print $2}')
5456
echo "COMMAND=${COMMAND}" >> $GITHUB_ENV
5557
case "${COMMAND}" in
5658
promote-release | drop-release)

.github/workflows/sonar.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ jobs:
4242
ref: ${{ github.event.workflow_run.head_branch }}
4343
fetch-depth: 0
4444
- name: Checkout base branch
45+
env:
46+
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
4547
run: |
4648
git remote add upstream ${{ github.event.repository.clone_url }}
4749
git fetch upstream
4850
git checkout -B ${{ fromJson(steps.get_pr_data.outputs.data).base.ref }} upstream/${{ fromJson(steps.get_pr_data.outputs.data).base.ref }}
49-
git checkout ${{ github.event.workflow_run.head_branch }}
51+
git checkout "${HEAD_BRANCH}"
5052
git clean -ffdx && git reset --hard HEAD
5153
- name: Set up QEMU
5254
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392

0 commit comments

Comments
 (0)