builds godot
Diffstat (limited to '.github/actions/setup/action.yml')
| -rw-r--r-- | .github/actions/setup/action.yml | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index d26934c..ca3d7e2 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -2,10 +2,6 @@ name: "Setup" description: "Setup the environment for building" inputs: - repo: - description: Godot github owner/repo - default: godotengine/godot - required: true ref: description: Which ref to build required: true @@ -16,14 +12,14 @@ runs: - name: Check if clean id: clean run: | - if [[ -d godot ]]; then echo "::set-output name=clean::false"; - else echo "::set-output name=clean::true"; fi + if [[ -d godot ]]; then echo "clean=false" >> $GITHUB_OUTPUT; + else echo "clean=true" >> $GITHUB_OUTPUT; fi shell: bash - uses: actions/checkout@v3 if: steps.clean.outputs.clean == 'true' with: - repository: ${{ inputs.repo }} + repository: godotengine/godot ref: ${{ inputs.ref }} path: "godot" @@ -34,7 +30,7 @@ runs: - name: Setup Python if: steps.clean.outputs.clean == 'true' - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.9 @@ -42,9 +38,11 @@ runs: if: steps.clean.outputs.clean == 'true' run: | # Patch godot - echo "::group::Patch godot" (cd repo && mv "${{ env.modules }}" ../godot/custom.py && mv patches ../godot) cd godot - for patch in patches/*; do git apply --ignore-whitespace "$patch" || echo "::error file={${patch}}::Go update your patch"; done - echo "::endgroup::" + for patch in patches/*; do git apply --ignore-whitespace "$patch" || err="$patch"; done + if [[ -n $err ]]; then + echo "::error file={${err}}::Go update your patch" + exit 1 + fi shell: bash |