Skip to content

Commit

Permalink
Merge branch 'docs/fix_badge'
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasssvaz committed Jul 2, 2024
2 parents 762d1a0 + 06796ea commit 6cb1851
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/tests_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
statuses: write
checks: write
pull-requests: write
contents: write
steps:
- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@v6
Expand Down Expand Up @@ -102,7 +103,27 @@ jobs:
repo: repo,
sha: sha,
state: '${{ job.status }}',
description: '${{ job.status }}' ? 'Runtime tests successful' : 'Runtime tests failed',
description: '${{ job.status }}' == 'success' ? 'Runtime tests successful' : 'Runtime tests failed',
target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
})).data;
core.info(`${name} is ${state}`);
- name: Create output folder
if: always() && (${{ env.original_event }} == 'schedule' || ${{ env.original_event }} == 'workflow_dispatch')
run: mkdir -p runtime-tests-results

- name: Generate badge
if: always() && (${{ env.original_event }} == 'schedule' || ${{ env.original_event }} == 'workflow_dispatch')
uses: jaywcjlove/generated-badges@main
with:
label: Runtime Tests
status: ${{ job.status }}
output: runtime-tests-results/badge.svg
color: ${{ job.status == 'success' && 'green' || 'red' }}

- name: Deploy badge
if: always() && (${{ env.original_event }} == 'schedule' || ${{ env.original_event }} == 'workflow_dispatch')
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./runtime-tests-results/badge.svg
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Arduino core for the ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2

![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)
![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)

### 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)

Expand Down

0 comments on commit 6cb1851

Please sign in to comment.