Wrong folder name #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code review | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, ready_for_review, synchronize] | ||
branches: | ||
- main | ||
jobs: | ||
SetUp: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: setVariables | ||
name: Set variables | ||
run: | | ||
isFromMain=${{ github.ref == 'refs/heads/main' }} | ||
isManual=${{ github.event_name == 'workflow_dispatch' }} | ||
hasKmpLabel=${{ contains(github.event.pull_request.labels.*.name, 'KMP') }} | ||
shouldRunKmp=false | ||
if $isFromMain || $isManual || $hasKmpLabel ; then | ||
shouldRunKmp=true | ||
fi | ||
echo "shouldRunKmp=$shouldRunKmp" >> "$GITHUB_OUTPUT" | ||
echo "shouldRunAndroid=${{ contains(github.event.pull_request.labels.*.name, 'Android') }}" >> "$GITHUB_OUTPUT" | ||
echo "shouldRunIos=${{ contains(github.event.pull_request.labels.*.name, 'iOS') }}" >> "$GITHUB_OUTPUT" | ||
echo "shouldRunDesktop=${{ contains(github.event.pull_request.labels.*.name, 'Desktop') }}" >> "$GITHUB_OUTPUT" | ||
if [ ${{ github.event_name }} == workflow_dispatch ] || [ ${{ github.event_name }} == push ] || ([ ${{ github.event_name }} == pull_request ] && [ ${{ github.event.pull_request.draft }} == false ]); then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
outputs: | ||
shouldRunKmp: ${{ steps.setVariables.outputs.shouldRunKmp }} | ||
shouldRunAndroid: ${{ steps.setVariables.outputs.shouldRunAndroid }} | ||
shouldRunIos: ${{ steps.setVariables.outputs.shouldRunIos }} | ||
shouldRunDesktop: ${{ steps.setVariables.outputs.shouldRunDesktop }} | ||
Build: | ||
needs: SetUp | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
shouldRunKmp: ${{ needs.SetUp.outputs.shouldRunKmp }} | ||
shouldRunAndroid: ${{ needs.SetUp.outputs.shouldRunAndroid }} | ||
shouldRunIos: ${{ needs.SetUp.outputs.shouldRunIos }} | ||
shouldRunDesktop: ${{ needs.SetUp.outputs.shouldRunDesktop }} | ||
UnitTests: | ||
needs: SetUp | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
shouldRunKmp: ${{ needs.SetUp.outputs.shouldRunKmp }} | ||
shouldRunAndroid: ${{ needs.SetUp.outputs.shouldRunAndroid }} | ||
shouldRunIos: ${{ needs.SetUp.outputs.shouldRunIos }} | ||
shouldRunDesktop: ${{ needs.SetUp.outputs.shouldRunDesktop }} | ||
Check failure on line 63 in .github/workflows/code_review.yml GitHub Actions / Code reviewInvalid workflow file
|
||
AllowMerge: | ||
if: always() | ||
runs-on: ubuntu-latest | ||
needs: [ Build, UnitTests ] | ||
steps: | ||
- run: | | ||
if [ ${{ github.event_name }} == pull_request ] && [ ${{ join(github.event.pull_request.labels.*.name) == '' }} == true ]; then | ||
exit 1 | ||
elif [ ${{ (contains(needs.Build.result, 'failure')) }} == true ] || [ ${{ (contains(needs.UnitTests.result, 'failure')) }} == true ]; then | ||
exit 1 | ||
else | ||
exit 0 | ||
fi |