From 6073a2f66d795ee7be5c7676d4d4fc4e2c1763e9 Mon Sep 17 00:00:00 2001 From: Giacomo Dematteis Date: Mon, 2 Dec 2024 12:25:35 +0100 Subject: [PATCH] workflows: on_target: commit ppk badge always Currently badge does not get committed if previous tests fail. Always commit it, script exits without fail if no file is found. Signed-off-by: Giacomo Dematteis --- .github/workflows/on_target.yml | 1 + tests/on_target/scripts/commit_badge.sh | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/on_target.yml b/.github/workflows/on_target.yml index cb1a9856..d577a250 100644 --- a/.github/workflows/on_target.yml +++ b/.github/workflows/on_target.yml @@ -121,6 +121,7 @@ jobs: MEMFAULT_PROJECT_SLUG: ${{ vars.MEMFAULT_PROJECT_SLUG }} - name: Commit and Push Badge File to gh-pages Branch + if: always() continue-on-error: true working-directory: thingy91x-oob env: diff --git a/tests/on_target/scripts/commit_badge.sh b/tests/on_target/scripts/commit_badge.sh index d773cb27..36e8c4c2 100755 --- a/tests/on_target/scripts/commit_badge.sh +++ b/tests/on_target/scripts/commit_badge.sh @@ -15,15 +15,15 @@ CSV_FILE_DEST=docs/power_measurements.csv # Check if files exist if [ ! -f $BADGE_FILE ]; then echo "Badge file not found: $BADGE_FILE" - exit 1 + exit 0 fi if [ ! -f $HTML_FILE ]; then echo "HTML file not found: $HTML_FILE" - exit 1 + exit 0 fi if [ ! -f $CSV_FILE ]; then echo "CSV file not found: $CSV_FILE" - exit 1 + exit 0 fi # Configure Git