Skip to content

Commit 9b9744f

Browse files
authored
publish.yml: Limit the running scope of the publish Workflow. (#6428)
1. Don't run the publish test result workflow on the master branch. 2. Run only on Pull Requests to be able to publish the result as a PR comment. 3. Avoid running when the triggering workflow was skipped, this will cause a failure as no file will be uploaded. Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
1 parent 68daea4 commit 9b9744f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/publish.yml

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Unit Test Results
33
on:
44
workflow_run:
55
workflows: [Run tests in hardware]
6+
branches-ignore: [master]
67

78
types:
89
- completed
@@ -11,6 +12,9 @@ jobs:
1112
unit-test-results:
1213
name: Unit Test Results
1314
runs-on: ubuntu-latest
15+
if: |
16+
github.event.workflow_run.event == 'pull_request' &&
17+
github.event.workflow_run.conclusion != 'skipped'
1418
steps:
1519
- name: Download and Extract Artifacts
1620
env:

0 commit comments

Comments
 (0)