builds godot
Diffstat (limited to '.github/actions/setup/action.yml')
| -rw-r--r-- | .github/actions/setup/action.yml | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index e39331f..23f0be9 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -2,20 +2,34 @@ name: "Setup" description: "Setup the environment for building" inputs: - url: - description: Godot git url - default: https://github.com/godotengine/godot + repo: + description: Godot github owner/repo + default: godotengine/godot required: true - branch: - description: Which branch to build + ref: + description: Which ref to build required: true runs: using: "composite" steps: - - name: Checkout + - name: Check if clean + id: clean run: | - [[ -d godot ]] && exit 0 # already checked out - git clone --depth 1 "${{ inputs.url }}" -b "${{ inputs.branch }}" godot - curl 'https://raw.githubusercontent.com/bend-n/godot-2d-builds/main/.github/custom.py' --output godot/custom.py || wget -nv 'https://raw.githubusercontent.com/bend-n/godot-2d-builds/main/.github/custom.py' -O godot/custom.py + if [[ -d godot ]]; then echo "::set-output name=clean::false"; + else echo "::set-output name=clean::true"; fi + shell: bash + + - uses: actions/checkout@v3 + if: steps.clean.outputs.clean == 'true' + with: + repository: ${{ inputs.repo }} + ref: ${{ inputs.ref }} + path: "godot" + + - name: Get module data + if: steps.clean.outputs.clean == 'true' + run: | + modules='https://raw.githubusercontent.com/bend-n/godot-2d-builds/main/.github/custom.py' + curl "$modules" --output godot/custom.py || wget -nv "$modules" -O godot/custom.py shell: bash |