bug fixed.

This commit is contained in:
AirryCo
2025-01-11 15:46:36 +08:00
parent cc4698aab2
commit 6cc3517a2e
3 changed files with 11 additions and 25 deletions

View File

@@ -103,8 +103,6 @@ jobs:
needs: prepare needs: prepare
if: needs.prepare.outputs.PROCEED == 'true' if: needs.prepare.outputs.PROCEED == 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
SOURCECODE_DIR: ${{ github.workspace }}/fika-server
outputs: outputs:
FIKA_ARTIFACT: ${{ steps.filename.outputs.FIKA_ARTIFACT }} FIKA_ARTIFACT: ${{ steps.filename.outputs.FIKA_ARTIFACT }}
@@ -167,7 +165,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
OUTPUT_DIR: spt-server OUTPUT_DIR: spt-server
SOURCECODE_DIR: ${{ github.workspace }}/code
outputs: outputs:
SPT_SERVER_COMMIT_TIME: ${{ steps.merge.outputs.SPT_SERVER_COMMIT_TIME }} SPT_SERVER_COMMIT_TIME: ${{ steps.merge.outputs.SPT_SERVER_COMMIT_TIME }}
@@ -201,7 +198,7 @@ jobs:
- name: Merge Server Code From SPT - name: Merge Server Code From SPT
id: merge id: merge
run: | run: |
git config -f .lfsconfig lfs.url https://${{ secrets.GITEA_PUSH_TOKEN }}:@${{ secrets.GITEA_URL }}/henry/spt-server.git/info/lfs git config -f .lfsconfig lfs.url https://${{ secrets.GITEA_PUSH_TOKEN }}:@git.rui.he.cn:3000/henry/spt-server.git/info/lfs
git lfs pull git lfs pull
git fetch -u ${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}.git ${{ needs.prepare.outputs.NIGHTLY_BRANCH_SPT }}:SPT-${{ env.NIGHTLY_BRANCH }} git fetch -u ${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}.git ${{ needs.prepare.outputs.NIGHTLY_BRANCH_SPT }}:SPT-${{ env.NIGHTLY_BRANCH }}
git merge -m "🤖 Merge branch '${{ env.NIGHTLY_BRANCH }}' from SPT" --no-ff SPT-${{ env.NIGHTLY_BRANCH }} git merge -m "🤖 Merge branch '${{ env.NIGHTLY_BRANCH }}' from SPT" --no-ff SPT-${{ env.NIGHTLY_BRANCH }}
@@ -273,7 +270,7 @@ jobs:
git pull git pull
REMOTE_URL="https://AirryCo:${{ secrets.AIRRYCO_TOKEN }}@github.com/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}.git" REMOTE_URL="https://AirryCo:${{ secrets.AIRRYCO_TOKEN }}@github.com/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}.git"
git remote set-url origin "$REMOTE_URL" git remote set-url origin "$REMOTE_URL"
git config -f .lfsconfig lfs.url https://${{ secrets.GITEA_PUSH_TOKEN }}:@${{ secrets.GITEA_URL }}/henry/spt-server.git/info/lfs git config -f .lfsconfig lfs.url https://${{ secrets.GITEA_PUSH_TOKEN }}:@git.rui.he.cn:3000/henry/spt-server.git/info/lfs
git push -u origin ${{ env.NIGHTLY_BRANCH }} git push -u origin ${{ env.NIGHTLY_BRANCH }}
shell: bash shell: bash
@@ -352,9 +349,6 @@ jobs:
context: ./docker context: ./docker
file: ./docker/Dockerfile-nightly file: ./docker/Dockerfile-nightly
push: true push: true
build-args: |
GITEA_TOKEN=${{ secrets.GITEA_PUSH_TOKEN }}
GITEA_URL=${{ secrets.GITEA_URL }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: | labels: |
${{ steps.meta.outputs.labels }} ${{ steps.meta.outputs.labels }}
@@ -369,9 +363,6 @@ jobs:
context: ./docker context: ./docker
file: ./docker/Dockerfile-nightly-fika file: ./docker/Dockerfile-nightly-fika
push: true push: true
build-args: |
GITEA_TOKEN=${{ secrets.GITEA_PUSH_TOKEN }}
GITEA_URL=${{ secrets.GITEA_URL }}
tags: ${{ steps.meta-fika.outputs.tags }} tags: ${{ steps.meta-fika.outputs.tags }}
labels: | labels: |
${{ steps.meta-fika.outputs.labels }} ${{ steps.meta-fika.outputs.labels }}
@@ -385,7 +376,6 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
env: env:
OUTPUT_DIR: spt-server OUTPUT_DIR: spt-server
SOURCECODE_DIR: c:/snapshot
outputs: outputs:
SPT_SERVER_COMMIT_TIME: ${{ steps.merge.outputs.SPT_SERVER_COMMIT_TIME }} SPT_SERVER_COMMIT_TIME: ${{ steps.merge.outputs.SPT_SERVER_COMMIT_TIME }}
WIN_COMMIT_ID: ${{ steps.debug-info.outputs.COMMIT_ID }} WIN_COMMIT_ID: ${{ steps.debug-info.outputs.COMMIT_ID }}
@@ -402,19 +392,18 @@ jobs:
lfs: 'false' lfs: 'false'
fetch-depth: '1' fetch-depth: '1'
token: '${{ secrets.AIRRYCO_TOKEN }}' token: '${{ secrets.AIRRYCO_TOKEN }}'
path: '${{ env.SOURCECODE_DIR }}'
# Modify the JSON file with PowerShell # Modify the JSON file with PowerShell
- name: Modify JSON file with PowerShell - name: Modify JSON file with PowerShell
run: | run: |
cd ${{ env.SOURCECODE_DIR }}/project/assets/configs cd project/assets/configs
$json = Get-Content -Path "core.json" | ConvertFrom-Json $json = Get-Content -Path "core.json" | ConvertFrom-Json
$json.projectName = "AirryCo's SPT Windows" $json.projectName = "AirryCo's SPT Windows"
$json | ConvertTo-Json -Depth 10 | Set-Content -Path "core.json" $json | ConvertTo-Json -Depth 10 | Set-Content -Path "core.json"
shell: pwsh shell: pwsh
- name: Replace serverExeName - name: Replace serverExeName
run: | run: |
cd ${{ env.SOURCECODE_DIR }}/project cd project
sed -i 's/SPT.Server/SPT.Server.exe/g' gulpfile.mjs sed -i 's/SPT.Server/SPT.Server.exe/g' gulpfile.mjs
shell: bash shell: bash
@@ -426,8 +415,6 @@ jobs:
- name: Runner Debug Information - name: Runner Debug Information
id: debug-info id: debug-info
run: | run: |
cp -v ${{ env.SOURCECODE_DIR }}/project/package.json .
cd ${{ env.SOURCECODE_DIR }}
echo "git version: $(git --version)" echo "git version: $(git --version)"
echo "git lfs version: $(git-lfs --version)" echo "git lfs version: $(git-lfs --version)"
echo "node.js version: $(node --version)" echo "node.js version: $(node --version)"
@@ -442,23 +429,22 @@ jobs:
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: | path: |
${{ env.SOURCECODE_DIR }}/project/node_modules project/node_modules
key: ${{ runner.os }}-npm-dependencies-${{ hashFiles('package.json') }} key: ${{ runner.os }}-npm-dependencies-${{ hashFiles('project/package.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-npm-dependencies- ${{ runner.os }}-npm-dependencies-
- name: Install NPM Dependencies - name: Install NPM Dependencies
if: steps.cache-npm-dependencies.outputs.cache-hit != 'true' if: steps.cache-npm-dependencies.outputs.cache-hit != 'true'
run: | run: |
cd ${{ env.SOURCECODE_DIR }}/project cd project
npm install npm install
shell: pwsh shell: pwsh
- name: Build Windows Server - name: Build Windows Server
id: build-server id: build-server
run: | run: |
cd ${{ env.SOURCECODE_DIR }} git config -f .lfsconfig lfs.url https://${{ secrets.GITEA_PUSH_TOKEN }}:@git.rui.he.cn:3000/henry/spt-server.git/info/lfs
git config -f .lfsconfig lfs.url https://${{ secrets.GITEA_PUSH_TOKEN }}:@${{ secrets.GITEA_URL }}/henry/spt-server.git/info/lfs
git lfs pull git lfs pull
cd project cd project
npm run build:release npm run build:release
@@ -480,7 +466,7 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: ${{ steps.filename.outputs.WIN_ARTIFACT }} name: ${{ steps.filename.outputs.WIN_ARTIFACT }}
path: ${{ env.SOURCECODE_DIR }}/project/${{ env.OUTPUT_DIR }} path: project/${{ env.OUTPUT_DIR }}
overwrite: true overwrite: true
update-trigger-and-push: update-trigger-and-push:

View File

@@ -1,7 +1,7 @@
FROM node:20.11.1-bullseye AS server-builder FROM node:20.11.1-bullseye AS server-builder
RUN apt update && apt install -y git git-lfs p7zip-full && \ RUN apt update && apt install -y git git-lfs p7zip-full && \
GIT_LFS_SKIP_SMUDGE=1 git clone -b 4.0.x-DEV --depth=1 https://github.com/AirryCo/spt-server.git /snapshot && \ GIT_LFS_SKIP_SMUDGE=1 git clone -b 4.0.x-DEV --depth=1 https://github.com/AirryCo/spt-server.git /snapshot && \
cd /snapshot && git config -f .lfsconfig lfs.url https://$GITEA_TOKEN:@$GITEA_URL/henry/spt-server.git/info/lfs && git lfs pull && \ cd /snapshot && git config -f .lfsconfig lfs.url https://git.rui.he.cn:3000/henry/spt-server.git/info/lfs && git lfs pull && \
cd project && \ cd project && \
npm install && npm run build:release && \ npm install && npm run build:release && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@@ -8,7 +8,7 @@ RUN apk add --no-cache git unzip && \
FROM node:22.12.0-bullseye AS server-builder FROM node:22.12.0-bullseye AS server-builder
RUN apt update && apt install -y git git-lfs p7zip-full && \ RUN apt update && apt install -y git git-lfs p7zip-full && \
GIT_LFS_SKIP_SMUDGE=1 git clone -b 4.0.x-DEV --depth=1 https://github.com/AirryCo/spt-server.git /snapshot && \ GIT_LFS_SKIP_SMUDGE=1 git clone -b 4.0.x-DEV --depth=1 https://github.com/AirryCo/spt-server.git /snapshot && \
cd /snapshot && git config -f .lfsconfig lfs.url https://$GITEA_TOKEN:@$GITEA_URL/henry/spt-server.git/info/lfs && git lfs pull && \ cd /snapshot && git config -f .lfsconfig lfs.url https://git.rui.he.cn:3000/henry/spt-server.git/info/lfs && git lfs pull && \
cd project && \ cd project && \
npm install && npm run build:release && \ npm install && npm run build:release && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*