Skip to content

Commit ca568b3

Browse files
committed
explicit dont run
1 parent 128f34b commit ca568b3

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

.github/workflows/release-caller.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
1-
# SPDX-FileCopyrightText: Brent Rubell for Adafruit Industries, 2022 - 2024
1+
# SPDX-FileCopyrightText: Brent Rubell for Adafruit Industries, 2022-2025
22
#
33
# SPDX-License-Identifier: MIT
44
name: WipperSnapper Release Workflow
5-
65
on:
76
release:
87
types: [published]
9-
branches-ignore:
10-
- offline-mode
8+
workflow_call:
119
secrets:
1210
GH_REPO_TOKEN:
1311
required: true
14-
1512
jobs:
13+
check-branch:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
should_run: ${{ steps.check.outputs.should_run }}
17+
steps:
18+
- id: check
19+
run: |
20+
if [[ $GITHUB_REF == *"offline-mode"* ]]; then
21+
echo "should_run=false" >> $GITHUB_OUTPUT
22+
else
23+
echo "should_run=true" >> $GITHUB_OUTPUT
24+
fi
25+
shell: bash
26+
1627
call-workflow-build:
28+
needs: check-branch
29+
if: needs.check-branch.outputs.should_run == 'true'
1730
uses: adafruit/Adafruit_Wippersnapper_Arduino/.github/workflows/build-clang-doxy.yml@main
1831
secrets:
1932
GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }}
20-
33+
2134
call-workflow-release:
22-
needs: call-workflow-build
23-
uses: adafruit/Adafruit_Wippersnapper_Arduino/.github/workflows/release-callee.yml@main
35+
needs: [check-branch, call-workflow-build]
36+
if: needs.check-branch.outputs.should_run == 'true'
37+
uses: adafruit/Adafruit_Wippersnapper_Arduino/.github/workflows/release-callee.yml@main

0 commit comments

Comments
 (0)