0
0
mirror of https://github.com/sp-tarkov/build.git synced 2025-02-12 14:50:44 -05:00

Cache launcher build by current git short hash

This commit is contained in:
Refringe 2024-03-28 20:14:30 -04:00
parent bada81f0fd
commit 1eb46361bf
Signed by: Refringe
GPG Key ID: 7715B85B4A6306ED

View File

@ -388,6 +388,7 @@ jobs:
image: refringe/spt-build-dotnet:1.0.0
steps:
- name: Clone
id: clone
run: |
rm -rf /workspace/SPT-AKI/Build/launcher
if [[ "${{ needs.prepare.outputs.is_nightly }}" == "true" ]]; then
@ -399,9 +400,23 @@ jobs:
echo "Cloning launcher from tag $TAG"
git clone https://dev.sp-tarkov.com/SPT-AKI/Launcher.git --branch "$TAG" --depth 1 /workspace/SPT-AKI/Build/launcher
fi
cd /workspace/SPT-AKI/Build/launcher
echo "::set-output name=launcher_commit::$(git rev-parse --short HEAD)"
shell: bash
- name: Cache Launcher Build
id: cache-launcher-build
uses: actions/cache@v4
with:
path: |
/workspace/SPT-AKI/Build/launcher/project/Build
key: launcher-build-${{ steps.clone.output.launcher_commit }}
restore-keys: |
launcher-build-
- name: Build Launcher
if: steps.cache-launcher-build.outputs.cache-hit != 'true'
run: |
cd /workspace/SPT-AKI/Build/launcher/project
dotnet build