only explicitly clone the scripts repo if a ref is given

develop
Myk Taylor 2023-08-03 00:53:39 -07:00
parent 0baa605069
commit fbbadf76ff
No known key found for this signature in database
1 changed files with 2 additions and 5 deletions

@ -67,15 +67,12 @@ jobs:
ref: ${{ inputs.dfhack_ref }}
submodules: true
fetch-depth: ${{ !inputs.platform-files && 1 || 0 }}
- name: Get scripts submodule ref
if: '!inputs.scripts_ref'
id: scriptssubmoduleref
run: echo ref=$(git submodule | fgrep scripts | cut -c2-41) >> $GITHUB_OUTPUT
- name: Clone scripts
if: inputs.scripts_ref
uses: actions/checkout@v3
with:
repository: 'DFHack/scripts'
ref: ${{ inputs.scripts_ref || steps.scriptssubmoduleref.outputs.ref }}
ref: ${{ inputs.scripts_ref }}
path: scripts
- name: Fetch ccache
if: inputs.platform-files