Skip to content

Commit 6cb1851

Browse files
committed
Merge branch 'docs/fix_badge'
2 parents 762d1a0 + 06796ea commit 6cb1851

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

.github/workflows/tests_results.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
statuses: write
2323
checks: write
2424
pull-requests: write
25+
contents: write
2526
steps:
2627
- name: Download and Extract Artifacts
2728
uses: dawidd6/action-download-artifact@v6
@@ -102,7 +103,27 @@ jobs:
102103
repo: repo,
103104
sha: sha,
104105
state: '${{ job.status }}',
105-
description: '${{ job.status }}' ? 'Runtime tests successful' : 'Runtime tests failed',
106+
description: '${{ job.status }}' == 'success' ? 'Runtime tests successful' : 'Runtime tests failed',
106107
target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
107108
})).data;
108109
core.info(`${name} is ${state}`);
110+
111+
- name: Create output folder
112+
if: always() && (${{ env.original_event }} == 'schedule' || ${{ env.original_event }} == 'workflow_dispatch')
113+
run: mkdir -p runtime-tests-results
114+
115+
- name: Generate badge
116+
if: always() && (${{ env.original_event }} == 'schedule' || ${{ env.original_event }} == 'workflow_dispatch')
117+
uses: jaywcjlove/generated-badges@main
118+
with:
119+
label: Runtime Tests
120+
status: ${{ job.status }}
121+
output: runtime-tests-results/badge.svg
122+
color: ${{ job.status == 'success' && 'green' || 'red' }}
123+
124+
- name: Deploy badge
125+
if: always() && (${{ env.original_event }} == 'schedule' || ${{ env.original_event }} == 'workflow_dispatch')
126+
uses: peaceiris/actions-gh-pages@v3
127+
with:
128+
github_token: ${{ secrets.GITHUB_TOKEN }}
129+
publish_dir: ./runtime-tests-results/badge.svg

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Arduino core for the ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2
22

3-
![Build Status](https://github.com/espressif/arduino-esp32/workflows/ESP32%20Arduino%20CI/badge.svg) [![External Libraries Test](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml/badge.svg?branch=master&event=schedule)](https://github.com/espressif/arduino-esp32/blob/gh-pages/LIBRARIES_TEST.md) [![Hardware Tests](https://github.com/espressif/arduino-esp32/actions/workflows/tests.yml/badge.svg?branch=master&event=schedule)](https://github.com/espressif/arduino-esp32/actions/workflows/tests.yml?query=event%3Aschedule)
3+
![Build Status](https://github.com/espressif/arduino-esp32/workflows/ESP32%20Arduino%20CI/badge.svg) [![External Libraries Test](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml/badge.svg?branch=master&event=schedule)](https://github.com/espressif/arduino-esp32/blob/gh-pages/LIBRARIES_TEST.md) [![Hardware Tests](https://github.com/espressif/arduino-esp32/blob/gh-pages/runtime-tests-results/badge.svg)](https://github.com/espressif/arduino-esp32/actions/workflows/tests_results.yml)
44

55
### Need help or have a question? Join the chat at [Gitter](https://gitter.im/espressif/arduino-esp32) or [open a new Discussion](https://github.com/espressif/arduino-esp32/discussions)
66

0 commit comments

Comments
 (0)