make the workflows repository agnostic

develop
Myk Taylor 2023-08-05 23:25:10 -07:00
parent 4087a9f303
commit 996688c4ae
No known key found for this signature in database
6 changed files with 15 additions and 12 deletions

@ -74,7 +74,7 @@ jobs:
- name: Clone DFHack - name: Clone DFHack
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: 'DFHack/dfhack' repository: ${{ inputs.dfhack_ref && github.repository || 'DFHack/dfhack' }}
ref: ${{ inputs.dfhack_ref }} ref: ${{ inputs.dfhack_ref }}
submodules: true submodules: true
fetch-depth: ${{ !inputs.platform-files && 1 || 0 }} fetch-depth: ${{ !inputs.platform-files && 1 || 0 }}
@ -82,14 +82,14 @@ jobs:
if: inputs.scripts_ref if: inputs.scripts_ref
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: 'DFHack/scripts' repository: ${{ inputs.scripts_ref && github.repository || 'DFHack/scripts' }}
ref: ${{ inputs.scripts_ref }} ref: ${{ inputs.scripts_ref }}
path: scripts path: scripts
- name: Clone structures - name: Clone structures
if: inputs.structures_ref if: inputs.structures_ref
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: 'DFHack/df-structures' repository: ${{ inputs.structures_ref && github.repository || 'DFHack/df-structures' }}
ref: ${{ inputs.structures_ref }} ref: ${{ inputs.structures_ref }}
path: library/xml path: library/xml
- name: Fetch ccache - name: Fetch ccache

@ -57,7 +57,7 @@ jobs:
- name: Clone DFHack - name: Clone DFHack
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: 'DFHack/dfhack' repository: ${{ inputs.dfhack_ref && github.repository || 'DFHack/dfhack' }}
ref: ${{ inputs.dfhack_ref }} ref: ${{ inputs.dfhack_ref }}
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
@ -65,14 +65,14 @@ jobs:
if: inputs.scripts_ref if: inputs.scripts_ref
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: 'DFHack/scripts' repository: ${{ inputs.scripts_ref && github.repository || 'DFHack/scripts' }}
ref: ${{ inputs.scripts_ref }} ref: ${{ inputs.scripts_ref }}
path: scripts path: scripts
- name: Clone structures - name: Clone structures
if: inputs.structures_ref if: inputs.structures_ref
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: 'DFHack/df-structures' repository: ${{ inputs.structures_ref && github.repository || 'DFHack/df-structures' }}
ref: ${{ inputs.structures_ref }} ref: ${{ inputs.structures_ref }}
path: library/xml path: library/xml
- name: Get 3rd party SDKs - name: Get 3rd party SDKs

@ -5,6 +5,8 @@ on: [push, pull_request]
jobs: jobs:
test: test:
uses: ./.github/workflows/test.yml uses: ./.github/workflows/test.yml
with:
dfhack_ref: ${{ github.ref }}
secrets: inherit secrets: inherit
package: package:
@ -16,6 +18,7 @@ jobs:
docs: docs:
uses: ./.github/workflows/build-linux.yml uses: ./.github/workflows/build-linux.yml
with: with:
dfhack_ref: ${{ github.ref }}
platform-files: false platform-files: false
common-files: false common-files: false
docs: true docs: true
@ -23,6 +26,8 @@ jobs:
lint: lint:
uses: ./.github/workflows/lint.yml uses: ./.github/workflows/lint.yml
with:
dfhack_ref: ${{ github.ref }}
secrets: inherit secrets: inherit
check-pr: check-pr:

@ -19,7 +19,7 @@ jobs:
- name: Clone DFHack - name: Clone DFHack
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: 'DFHack/dfhack' repository: ${{ inputs.dfhack_ref && github.repository || 'DFHack/dfhack' }}
ref: ${{ inputs.dfhack_ref }} ref: ${{ inputs.dfhack_ref }}
- name: Get scripts submodule ref - name: Get scripts submodule ref
if: '!inputs.scripts_ref' if: '!inputs.scripts_ref'
@ -28,7 +28,7 @@ jobs:
- name: Clone scripts - name: Clone scripts
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: 'DFHack/scripts' repository: ${{ inputs.scripts_ref && github.repository || 'DFHack/scripts' }}
ref: ${{ inputs.scripts_ref || steps.scriptssubmoduleref.outputs.ref }} ref: ${{ inputs.scripts_ref || steps.scriptssubmoduleref.outputs.ref }}
path: scripts path: scripts
- name: Check whitespace - name: Check whitespace

@ -68,8 +68,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
concurrency: steam concurrency: steam
steps: steps:
- name: Get tag
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Stage depot files - name: Stage depot files
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
- name: Steam deploy - name: Steam deploy
@ -78,7 +76,7 @@ jobs:
username: ${{ secrets.STEAM_USERNAME }} username: ${{ secrets.STEAM_USERNAME }}
configVdf: ${{ secrets.STEAM_CONFIG_VDF}} configVdf: ${{ secrets.STEAM_CONFIG_VDF}}
appId: 2346660 appId: 2346660
buildDescription: ${{ github.event.inputs && github.event.inputs.version || env.TAG }} buildDescription: ${{ github.event.inputs && github.event.inputs.version || github.ref_name }}
rootPath: . rootPath: .
depot1Path: common-depot depot1Path: common-depot
depot2Path: win64-depot depot2Path: win64-depot

@ -78,7 +78,7 @@ jobs:
- name: Clone DFHack - name: Clone DFHack
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: 'DFHack/dfhack' repository: ${{ inputs.dfhack_ref && github.repository || 'DFHack/dfhack' }}
ref: ${{ inputs.dfhack_ref }} ref: ${{ inputs.dfhack_ref }}
- name: Detect DF version - name: Detect DF version
shell: bash shell: bash