mirror of
https://github.com/sp-tarkov/build.git
synced 2025-02-13 03:30:45 -05:00
Cache modules build by current git short hash
This commit is contained in:
parent
fa409d1e0b
commit
bada81f0fd
@ -303,6 +303,7 @@ jobs:
|
|||||||
image: refringe/spt-build-dotnet:1.0.0
|
image: refringe/spt-build-dotnet:1.0.0
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
|
id: clone
|
||||||
run: |
|
run: |
|
||||||
rm -rf /workspace/SPT-AKI/Build/modules
|
rm -rf /workspace/SPT-AKI/Build/modules
|
||||||
if [[ "${{ needs.prepare.outputs.is_nightly }}" == "true" ]]; then
|
if [[ "${{ needs.prepare.outputs.is_nightly }}" == "true" ]]; then
|
||||||
@ -314,6 +315,9 @@ jobs:
|
|||||||
echo "Cloning modules from tag $TAG"
|
echo "Cloning modules from tag $TAG"
|
||||||
git clone https://dev.sp-tarkov.com/SPT-AKI/Modules.git --branch "$TAG" --depth 1 /workspace/SPT-AKI/Build/modules
|
git clone https://dev.sp-tarkov.com/SPT-AKI/Modules.git --branch "$TAG" --depth 1 /workspace/SPT-AKI/Build/modules
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cd /workspace/SPT-AKI/Build/modules
|
||||||
|
echo "::set-output name=modules_commit::$(git rev-parse --short HEAD)"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Download Client Module Package
|
- name: Download Client Module Package
|
||||||
@ -348,7 +352,18 @@ jobs:
|
|||||||
echo "Client module package deleted."
|
echo "Client module package deleted."
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
- name: Cache Modules Build
|
||||||
|
id: cache-modules-build
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
/workspace/SPT-AKI/Build/modules/project/Build
|
||||||
|
key: modules-build-${{ steps.clone.output.modules_commit }}
|
||||||
|
restore-keys: |
|
||||||
|
modules-build-
|
||||||
|
|
||||||
- name: Build Modules
|
- name: Build Modules
|
||||||
|
if: steps.cache-modules-build.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cd /workspace/SPT-AKI/Build/modules/project
|
cd /workspace/SPT-AKI/Build/modules/project
|
||||||
dotnet build -c Release -p:Version=${{ needs.prepare.outputs.spt_version }}
|
dotnet build -c Release -p:Version=${{ needs.prepare.outputs.spt_version }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user