Skip to content

Commit 93d0fca

Browse files
authored
Update main.yml
1 parent 885b47c commit 93d0fca

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,16 @@ jobs:
123123
steps:
124124
- name: Checkout repository
125125
uses: actions/checkout@v2
126+
127+
- uses: jwalton/gh-find-current-pr@v1
128+
id: findPr
126129
with:
127-
ref: ${{ github.event.pull_request.head.sha }}
130+
github-token: ${{ secrets.GITHUB_TOKEN }}
131+
132+
- name: Checkout PR
133+
uses: dawidd6/action-checkout-pr@v1
134+
with:
135+
pr: steps.findPr.outputs.number
128136

129137
- uses: actions/setup-dotnet@v1
130138
with:
@@ -146,7 +154,6 @@ jobs:
146154
author_name: Github Actions
147155
author_email: actions@github.com
148156
message: Automated dotnet-format update
149-
ref: ${{ github.event.pull_request.head.sha }}
150157
env:
151158
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152159

0 commit comments

Comments
 (0)