Skip to content

Commit 2f0fcdf

Browse files
committed
ci: twister: do not fail if there are no artifacts
Do not fail if we can't download any artifacts, i.e. when job is cancelled. Only publish on push/schedule Signed-off-by: Anas Nashif <[email protected]>
1 parent 1be5c15 commit 2f0fcdf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/twister-publish.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ on:
1111

1212
jobs:
1313
upload-to-elasticsearch:
14-
if: github.repository == 'zephyrproject-rtos/zephyr'
14+
if: |
15+
github.repository == 'zephyrproject-rtos/zephyr' &&
16+
github.event.workflow_run.event != 'pull_request_target'
1517
env:
1618
ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }}
1719
ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
@@ -25,13 +27,16 @@ jobs:
2527
persist-credentials: false
2628

2729
- name: Download Artifacts
30+
id: download-artifacts
2831
uses: dawidd6/action-download-artifact@v6
2932
with:
3033
path: artifacts
3134
workflow: twister.yml
3235
run_id: ${{ github.event.workflow_run.id }}
36+
if_no_artifact_found: ignore
3337

3438
- name: Upload to elasticsearch
39+
if: steps.download-artifacts.outputs.found_artifact == 'true'
3540
run: |
3641
pip3 install elasticsearch
3742
# set run date on upload to get consistent and unified data across the matrix.

0 commit comments

Comments
 (0)