Skip to content

Commit b585c72

Browse files
authored
fix(ci): testing local state in push check
Testing the push should only be done on the remote/origin
1 parent f617d52 commit b585c72

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/test_action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,15 @@ jobs:
3232
github_token: ${{ secrets.GITHUB_TOKEN }}
3333
commit: false
3434
push: false
35+
- uses: actions/checkout@v2
36+
with:
37+
ref: ${{github.event.pull_request.head.ref}}
38+
repository: ${{github.event.pull_request.head.repo.full_name}}
39+
fetch-depth: 0 # ensures that tags are fetched, seems to be needed
40+
path: new_head
3541
- name: Test push
3642
run: |
43+
cd new_head
3744
last_pushed_commit=$(git rev-parse ${{ github.head_ref }})
3845
echo "Commit sha on origin : $last_pushed_commit"
3946
if [[ $last_pushed_commit != ${{steps.capture.outputs.commit}} ]]; then

0 commit comments

Comments
 (0)