Don't skip firmware jobs if workflow is run manually (#3821)

* add workflow dispatch and check

* single quotes

* undo hack
This commit is contained in:
David Holdeman 2022-01-20 16:56:09 -06:00 committed by GitHub
parent 2af87568e9
commit 9215d1b2dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
name: FW
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]
jobs:
build-firmware:
@ -194,9 +194,9 @@ jobs:
steps:
- name: Execution throttle early exit
if: ${{ matrix.skip-rate }}
# todo: how do we produce well-defined releases with skip-rate approach? For I can think of hacking the line below before a release
run: if (($(($RANDOM % 100)) < ${{ matrix.skip-rate }})); then echo "skip=not_true" >> $GITHUB_ENV; fi
# Don't skip any jobs if this workflow was run manually.
if: ${{ matrix.skip-rate && github.event_name != 'workflow_dispatch' }}
run: if (($(($RANDOM % 100)) < ${{ matrix.skip-rate }})); then echo "skip=true" >> $GITHUB_ENV; fi
- uses: actions/checkout@v1
if: ${{ env.skip != 'true' }}