mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-14 02:00:37 +08:00
CI: don't use tmp for build folder
This commit is contained in:
parent
de7b66b3ce
commit
fe8109cd4d
11
.github/workflows/main.yml
vendored
11
.github/workflows/main.yml
vendored
@ -30,12 +30,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version-file: ".node-version"
|
node-version-file: ".node-version"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
- name: Create RAM Disk for building
|
|
||||||
id: ramdisk
|
|
||||||
run: |
|
|
||||||
BUILD_DIR=$(mktemp -d -p "$TMPDIR" -t "sukka-surge-public.XXXXXXXXXX")
|
|
||||||
echo "Build dir created at $BUILD_DIR"
|
|
||||||
echo "build_dir=$BUILD_DIR" >> $GITHUB_OUTPUT
|
|
||||||
- name: Download Previous Build
|
- name: Download Previous Build
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -43,9 +37,12 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
path: previous-build-${{ github.run_id }}-${{ github.run_number }}
|
path: previous-build-${{ github.run_id }}-${{ github.run_number }}
|
||||||
token: ${{ secrets.GIT_TOKEN }}
|
token: ${{ secrets.GIT_TOKEN }}
|
||||||
|
- name: Grab Building Folder
|
||||||
|
id: ramdisk
|
||||||
|
run: |
|
||||||
|
echo "build_dir=previous-build-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_OUTPUT
|
||||||
- name: Setup build folder
|
- name: Setup build folder
|
||||||
run: |
|
run: |
|
||||||
mv previous-build-${{ github.run_id }}-${{ github.run_number }}/{.,}* ${{ steps.ramdisk.outputs.build_dir }}/
|
|
||||||
if [ ! -d ${{ steps.ramdisk.outputs.build_dir }}/.git ]; then
|
if [ ! -d ${{ steps.ramdisk.outputs.build_dir }}/.git ]; then
|
||||||
echo ".git not found"
|
echo ".git not found"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user