File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 99 required : true
1010 type : string
1111 description : " Branch to checkout and compare against (e.g. harshmishra/doc-91)"
12+ pull_request :
13+ types : [opened, synchronize, reopened]
1214
1315jobs :
1416 update-azure-coverage :
2325 with :
2426 fetch-depth : 0
2527 path : docs
26- ref : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.targetBranch || 'main' }}
28+ ref : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.targetBranch || github.event_name == 'pull_request' && github.head_ref || 'main' }}
2729
2830 - name : Set up system wide dependencies
2931 run : |
5860 id : check-for-changes
5961 working-directory : docs
6062 env :
61- TARGET_BRANCH : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.targetBranch || 'main' }}
63+ TARGET_BRANCH : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.targetBranch || github.event_name == 'pull_request' && github.head_ref || 'main' }}
6264 run : |
6365 mkdir -p resources
6466 (git diff --name-only origin/automated-azure-coverage-updates src/data/azure-coverage/ 2>/dev/null || git diff --name-only "origin/$TARGET_BRANCH" src/data/azure-coverage/ 2>/dev/null) | tee -a resources/diff-check.log
6769
6870 - name : Create PR
6971 uses : peter-evans/create-pull-request@v7
70- if : ${{ success() && steps.check-for-changes.outputs.diff-count != '0' && steps.check-for-changes.outputs.diff-count != '' }}
72+ if : ${{ github.event_name != 'pull_request' && success() && steps.check-for-changes.outputs.diff-count != '0' && steps.check-for-changes.outputs.diff-count != '' }}
7173 with :
7274 path : docs
7375 title : " Update Azure coverage data"
You can’t perform that action at this time.
0 commit comments