@@ -10,13 +10,13 @@ jobs:
10
10
steps :
11
11
- uses : actions/checkout@v2
12
12
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 }} "
15
15
fetch-depth : 0 # ensures that tags are fetched, seems to be needed
16
16
- name : Capture commit id
17
17
id : capture
18
18
run : |
19
- COMMIT_ID=$(git rev-parse ${{ github.head_ref }})
19
+ COMMIT_ID=" $(git rev-parse " ${{ github.head_ref }}")"
20
20
echo "The sha of the starting commit is $COMMIT_ID"
21
21
echo "::set-output name=commit::$COMMIT_ID"
22
22
- name : create test commit
@@ -29,27 +29,27 @@ jobs:
29
29
- name : test action
30
30
uses : ./
31
31
with :
32
- github_token : ${{ secrets.GITHUB_TOKEN }}
32
+ github_token : " ${{ secrets.GITHUB_TOKEN }}"
33
33
commit : false
34
34
push : false
35
35
- uses : actions/checkout@v2
36
36
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 }} "
39
39
fetch-depth : 0 # ensures that tags are fetched, seems to be needed
40
40
path : new_head
41
41
- name : Test push
42
42
run : |
43
43
cd new_head
44
- last_pushed_commit=$(git rev-parse ${{ github.head_ref }})
44
+ last_pushed_commit=" $(git rev-parse " ${{ github.head_ref }}")"
45
45
echo "Commit sha on origin: $last_pushed_commit"
46
- if [[ $last_pushed_commit != ${{steps.capture.outputs.commit}} ]]; then
46
+ if [[ $last_pushed_commit != ${{ steps.capture.outputs.commit }} ]]; then
47
47
echo "Something got pushed to ${{ github.head_ref }}"
48
48
exit 1
49
49
fi
50
50
- name : Test commit
51
51
run : |
52
- commit_message=$(git log -1 HEAD --pretty=format:%s)
52
+ commit_message=" $(git log -1 HEAD --pretty=format:%s)"
53
53
echo "Latest commit: $commit_message"
54
54
if [[ $commit_message != "feat: test feature" ]]; then
55
55
echo "The latest commit message is not 'feat: test feature'"
0 commit comments