Skip to content

Commit bd3e983

Browse files
committed
Fix CI script
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
1 parent ab59d30 commit bd3e983

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,18 @@ jobs:
3939
run: |
4040
if [ "${{ github.event_name }}" = "pull_request" ]; then
4141
echo "GitHub event=pull_request"
42-
COMMIT_SHA=${{ github.event.pull_request.head.sha }}
43-
COMMIT_MESSAGE=$(curl -s \
42+
COMMIT_SHA="${{ github.event.pull_request.head.sha }}"
43+
COMMIT_MESSAGE="$(curl -s \
4444
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
45-
https://api.github.com/repos/${{ github.repository }}/commits/$COMMIT_SHA | jq -r '.commit.message')
45+
https://api.github.com/repos/${{ github.repository }}/commits/$COMMIT_SHA | jq -r '.commit.message')"
4646
echo "Commit message=$COMMIT_MESSAGE" | head -n 1
4747
echo "commit_message=$COMMIT_MESSAGE" | head -n 1 >> $GITHUB_OUTPUT
4848
else
49-
echo "GitHub event=${{ github.event_name }}"
50-
echo "Commit message=${{ github.event.head_commit.message }}" | head -n 1
51-
echo "commit_message=${{ github.event.head_commit.message }}" | head -n 1 >> $GITHUB_OUTPUT
52-
fi
49+
echo "GitHub event=${{ github.event_name }}"
50+
COMMIT_MESSAGE="${{ github.event.head_commit.message }}"
51+
echo "Commit message=$COMMIT_MESSAGE" | head -n 1
52+
echo "commit_message=$COMMIT_MESSAGE" | head -n 1 >> $GITHUB_OUTPUT
53+
fi
5354
5455
- name: Get changed files
5556
id: changed-files

0 commit comments

Comments
 (0)