Skip to content

Commit db8d294

Browse files
committed
run on PRs
1 parent 1545e20 commit db8d294

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/update-azure-coverage.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
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

1315
jobs:
1416
update-azure-coverage:
@@ -23,7 +25,7 @@ jobs:
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: |
@@ -58,7 +60,7 @@ jobs:
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

0 commit comments

Comments
 (0)