mirror of https://github.com/rusefi/rusefi.git
parent
a153ca81b0
commit
371557237f
|
@ -296,10 +296,23 @@ jobs:
|
|||
- name: Check branch name
|
||||
if: ${{ contains(github.ref_name, '.') }}
|
||||
run: echo '::error::Branch names must not contain ".", this breaks firmware autoupdates.' && exit 1
|
||||
|
||||
- name: Execution throttle early exit
|
||||
# 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
|
||||
# Don't skip any jobs if this workflow was run manually,
|
||||
# or if the commit contains `only:`, signifying that only one bundle should be built.
|
||||
if: ${{ matrix.skip-rate && github.event_name != 'workflow_dispatch' || contains(github.event.head_commit.message, 'only:') }}
|
||||
run: |
|
||||
# if the commit message contains `only:`, get the part after the semicolon and check if it matches the build target.
|
||||
if echo ${{ github.event.head_commit.message }} | grep "only:"; then
|
||||
if [ "$(echo ${{ github.event.head_commit.message }} | grep -Po '(?<=only:)[^\s]*')" = "${{ matrix.build-target }}" ]; then
|
||||
exit 0
|
||||
else
|
||||
# if it doesn't match, skip this job.
|
||||
echo "skip=true" >> $GITHUB_ENV
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
if (($(($RANDOM % 100)) < ${{ matrix.skip-rate }})); then echo "skip=true" >> $GITHUB_ENV; fi
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
if: ${{ env.skip != 'true' }}
|
||||
|
|
Loading…
Reference in New Issue