@@ -10,13 +10,13 @@ jobs:
1010 steps :
1111 - uses : actions/checkout@v2
1212 with :
13- ref : ${{github.event.pull_request.head.ref}}
14- repository : ${{github.event.pull_request.head.repo.full_name}}
13+ ref : " ${{github.event.pull_request.head.ref }} "
14+ repository : " ${{github.event.pull_request.head.repo.full_name }} "
1515 fetch-depth : 0 # ensures that tags are fetched, seems to be needed
1616 - name : Capture commit id
1717 id : capture
1818 run : |
19- COMMIT_ID=$(git rev-parse ${{ github.head_ref }})
19+ COMMIT_ID=" $(git rev-parse " ${{ github.head_ref }}")"
2020 echo "The sha of the starting commit is $COMMIT_ID"
2121 echo "::set-output name=commit::$COMMIT_ID"
2222 - name : create test commit
@@ -29,27 +29,27 @@ jobs:
2929 - name : test action
3030 uses : ./
3131 with :
32- github_token : ${{ secrets.GITHUB_TOKEN }}
32+ github_token : " ${{ secrets.GITHUB_TOKEN }}"
3333 commit : false
3434 push : false
3535 - uses : actions/checkout@v2
3636 with :
37- ref : ${{github.event.pull_request.head.ref}}
38- repository : ${{github.event.pull_request.head.repo.full_name}}
37+ ref : " ${{github.event.pull_request.head.ref }} "
38+ repository : " ${{github.event.pull_request.head.repo.full_name }} "
3939 fetch-depth : 0 # ensures that tags are fetched, seems to be needed
4040 path : new_head
4141 - name : Test push
4242 run : |
4343 cd new_head
44- last_pushed_commit=$(git rev-parse ${{ github.head_ref }})
45- echo "Commit sha on origin: $last_pushed_commit"
46- if [[ $last_pushed_commit != ${{steps.capture.outputs.commit}} ]]; then
44+ last_pushed_commit=" $(git rev-parse " ${{ github.head_ref }}")"
45+ echo "Commit sha on origin: $last_pushed_commit"
46+ if [[ $last_pushed_commit != ${{steps.capture.outputs.commit}} ]]; then
4747 echo "Something got pushed to ${{ github.head_ref }}"
4848 exit 1
4949 fi
5050 - name : Test commit
5151 run : |
52- commit_message=$(git log -1 HEAD --pretty=format:%s)
52+ commit_message=" $(git log -1 HEAD --pretty=format:%s)"
5353 echo "Latest commit: $commit_message"
5454 if [[ $commit_message != "feat: test feature" ]]; then
5555 echo "The latest commit message is not 'feat: test feature'"
0 commit comments