mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Fix support for multiple workflows being triggered (#8408)
This commit is contained in:
committed by
GitHub
parent
332bf8bbb4
commit
1e7a046803
18
.github/workflows/Handoff.yml
vendored
18
.github/workflows/Handoff.yml
vendored
@@ -23,34 +23,34 @@ jobs:
|
||||
ext="${file##*.}"
|
||||
case $ext in
|
||||
md)
|
||||
category=Markdown;;
|
||||
category+=" Markdown";;
|
||||
rb)
|
||||
category=Ruby;;
|
||||
category+=" Ruby";;
|
||||
sh)
|
||||
category=Bash;;
|
||||
category+=" Bash";;
|
||||
yml|yaml)
|
||||
category=YAML;;
|
||||
category+=" YAML";;
|
||||
*)
|
||||
echo "Unable to check syntax of $file.";;
|
||||
esac
|
||||
# In order for files such as bin/crew to be recognised
|
||||
[[ "$(file -b $file | cut -d' ' -f1)" == "Ruby" ]] && category=Ruby
|
||||
[[ "$(file -b $file | cut -d' ' -f1)" == "Ruby" ]] && category+=" Ruby"
|
||||
done
|
||||
echo "category=$category" >> $GITHUB_OUTPUT
|
||||
# Github won't let us do this neatly, see https://github.com/orgs/community/discussions/25246
|
||||
markdown:
|
||||
needs: handoff
|
||||
if: ${{ needs.handoff.outputs.category == 'Markdown' }}
|
||||
if: contains(needs.handoff.outputs.category, 'Markdown')
|
||||
uses: ./.github/workflows/Markdown-lint.yml
|
||||
ruby:
|
||||
needs: handoff
|
||||
if: ${{ needs.handoff.outputs.category == 'Ruby' }}
|
||||
if: contains(needs.handoff.outputs.category, 'Ruby')
|
||||
uses: ./.github/workflows/Rubocop.yml
|
||||
bash:
|
||||
needs: handoff
|
||||
if: ${{ needs.handoff.outputs.category == 'Bash' }}
|
||||
if: contains(needs.handoff.outputs.category, 'Bash')
|
||||
uses: ./.github/workflows/ShellCheck.yml
|
||||
yaml:
|
||||
needs: handoff
|
||||
if: ${{ needs.handoff.outputs.category == 'YAML' }}
|
||||
if: contains(needs.handoff.outputs.category, 'YAML')
|
||||
uses: ./.github/workflows/YAMLlint.yml
|
||||
|
||||
Reference in New Issue
Block a user