From ca568b36e2d04cd2e25f1479f55ed63182721ba5 Mon Sep 17 00:00:00 2001 From: brentru Date: Mon, 3 Mar 2025 12:09:08 -0500 Subject: [PATCH] explicit dont run --- .github/workflows/release-caller.yml | 30 ++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-caller.yml b/.github/workflows/release-caller.yml index 4600eee1..cae531ca 100644 --- a/.github/workflows/release-caller.yml +++ b/.github/workflows/release-caller.yml @@ -1,23 +1,37 @@ -# SPDX-FileCopyrightText: Brent Rubell for Adafruit Industries, 2022 - 2024 +# SPDX-FileCopyrightText: Brent Rubell for Adafruit Industries, 2022-2025 # # SPDX-License-Identifier: MIT name: WipperSnapper Release Workflow - on: release: types: [published] - branches-ignore: - - offline-mode + workflow_call: secrets: GH_REPO_TOKEN: required: true - jobs: + check-branch: + runs-on: ubuntu-latest + outputs: + should_run: ${{ steps.check.outputs.should_run }} + steps: + - id: check + run: | + if [[ $GITHUB_REF == *"offline-mode"* ]]; then + echo "should_run=false" >> $GITHUB_OUTPUT + else + echo "should_run=true" >> $GITHUB_OUTPUT + fi + shell: bash + call-workflow-build: + needs: check-branch + if: needs.check-branch.outputs.should_run == 'true' uses: adafruit/Adafruit_Wippersnapper_Arduino/.github/workflows/build-clang-doxy.yml@main secrets: GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }} - + call-workflow-release: - needs: call-workflow-build - uses: adafruit/Adafruit_Wippersnapper_Arduino/.github/workflows/release-callee.yml@main + needs: [check-branch, call-workflow-build] + if: needs.check-branch.outputs.should_run == 'true' + uses: adafruit/Adafruit_Wippersnapper_Arduino/.github/workflows/release-callee.yml@main \ No newline at end of file