File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,12 @@ jobs:
10
10
steps :
11
11
- uses : actions/checkout@v2
12
12
with :
13
+ ref : ${{ github.head_ref }}
13
14
fetch-depth : 0 # ensures that tags are fetched, seems to be needed
14
15
- name : Capture commit id
15
16
id : capture
16
17
run : |
17
- COMMIT_ID=$(git rev-parse origin/ ${{ github.head_ref }})
18
+ COMMIT_ID=$(git rev-parse ${{ github.head_ref }})
18
19
echo "The sha of the starting commit is $COMMIT_ID"
19
20
echo "::set-output name=commit::$COMMIT_ID"
20
21
- name : create test commit
32
33
push : false
33
34
- name : Test push
34
35
run : |
35
- last_pushed_commit=$(git rev-parse origin/ ${{ github.head_ref }})
36
+ last_pushed_commit=$(git rev-parse ${{ github.head_ref }})
36
37
echo "Commit sha on origin : $last_pushed_commit"
37
38
if [[ $last_pushed_commit != ${{steps.capture.outputs.commit}} ]]; then
38
39
echo "Something got pushed to ${{ github.head_ref }}"
You can’t perform that action at this time.
0 commit comments