switch RELEASE_BRANCH to master
- add fika-server built-in to release version - add Dockerfiles
This commit is contained in:
242
.github/workflows/build-nightly-cron.yaml
vendored
242
.github/workflows/build-nightly-cron.yaml
vendored
@@ -108,8 +108,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Clone Fika Server Code
|
- name: Clone Fika Server Code
|
||||||
run: |
|
run: |
|
||||||
@@ -162,121 +160,6 @@ jobs:
|
|||||||
path: ${{ env.SOURCECODE_DIR }}/output
|
path: ${{ env.SOURCECODE_DIR }}/output
|
||||||
overwrite: true
|
overwrite: true
|
||||||
|
|
||||||
build-server-windows:
|
|
||||||
needs: prepare
|
|
||||||
if: needs.prepare.outputs.PROCEED == 'true' || needs.prepare.outputs.PROCEED_FIKA == 'true'
|
|
||||||
runs-on: windows-latest
|
|
||||||
env:
|
|
||||||
OUTPUT_DIR: spt-server
|
|
||||||
SOURCECODE_DIR: c:/snapshot
|
|
||||||
outputs:
|
|
||||||
SPT_SERVER_COMMIT_TIME: ${{ steps.merge.outputs.SPT_SERVER_COMMIT_TIME }}
|
|
||||||
WIN_COMMIT_ID: ${{ steps.debug-info.outputs.COMMIT_ID }}
|
|
||||||
WIN_ARTIFACT: ${{ steps.filename.outputs.WIN_ARTIFACT }}
|
|
||||||
WIN_RELEASE_FILE: ${{ steps.filename.outputs.WIN_RELEASE }}
|
|
||||||
WIN_RELEASE_FIKA_FILE: ${{ steps.filename.outputs.WIN_RELEASE_FIKA }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup Git Config
|
|
||||||
run: |
|
|
||||||
git config --global user.name "github-actions[bot]"
|
|
||||||
git config --global user.email "bot@github.com"
|
|
||||||
|
|
||||||
- name: Clone AirryCo's Windows Server Code
|
|
||||||
run: |
|
|
||||||
git clone -b ${{ env.NIGHTLY_BRANCH }}_Win ${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }} ${{ env.SOURCECODE_DIR }}
|
|
||||||
cd ${{ env.SOURCECODE_DIR }}
|
|
||||||
git lfs pull
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20.11.1
|
|
||||||
|
|
||||||
- name: Merge Server Code From SPT
|
|
||||||
id: merge
|
|
||||||
run: |
|
|
||||||
cd ${{ env.SOURCECODE_DIR }}
|
|
||||||
git pull
|
|
||||||
git fetch -u ${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}.git ${{ env.NIGHTLY_BRANCH }}:SPT-${{ env.NIGHTLY_BRANCH }}
|
|
||||||
git merge -m "🤖 Merge branch '${{ env.NIGHTLY_BRANCH }}' from SPT" --no-ff SPT-${{ env.NIGHTLY_BRANCH }}
|
|
||||||
|
|
||||||
SPT_SERVER_COMMIT_TIME=$(git log --pretty=format:"%ai" SPT-${{ env.NIGHTLY_BRANCH }} -1)
|
|
||||||
echo "👽 SPT_SERVER_COMMIT_TIME = $SPT_SERVER_COMMIT_TIME"
|
|
||||||
echo "SPT_SERVER_COMMIT_TIME=$SPT_SERVER_COMMIT_TIME" >> $GITHUB_OUTPUT
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Runner Debug Information
|
|
||||||
id: debug-info
|
|
||||||
run: |
|
|
||||||
cp -v ${{ env.SOURCECODE_DIR }}/project/package.json .
|
|
||||||
cd ${{ env.SOURCECODE_DIR }}
|
|
||||||
echo "git version: $(git --version)"
|
|
||||||
echo "git lfs version: $(git-lfs --version)"
|
|
||||||
echo "node.js version: $(node --version)"
|
|
||||||
echo "npm version: $(npm --version)"
|
|
||||||
echo "latest commit hash: $(git rev-parse HEAD)"
|
|
||||||
echo "last commit message:" && git log -1 --pretty=%B
|
|
||||||
echo "COMMIT_ID=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Cache NPM Dependencies
|
|
||||||
id: cache-npm-dependencies
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
${{ env.SOURCECODE_DIR }}/project/node_modules
|
|
||||||
key: ${{ runner.os }}-npm-dependencies-${{ hashFiles('package.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-npm-dependencies-
|
|
||||||
|
|
||||||
- name: Install NPM Dependencies
|
|
||||||
if: steps.cache-npm-dependencies.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
cd ${{ env.SOURCECODE_DIR }}/project
|
|
||||||
npm install --legacy-peer-deps
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: Build Windows Server
|
|
||||||
id: build-server
|
|
||||||
run: |
|
|
||||||
cd ${{ env.SOURCECODE_DIR }}/project
|
|
||||||
npm run build:release
|
|
||||||
ls -l build
|
|
||||||
mv build ${{ env.OUTPUT_DIR }}
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Generate Windows File Name
|
|
||||||
id: filename
|
|
||||||
run: |
|
|
||||||
artifact_name=${{ env.OUTPUT_DIR }}-${{ needs.prepare.outputs.SPT_VERSION }}-win-nightly-${{ steps.debug-info.outputs.COMMIT_ID }}-EFT${{ needs.prepare.outputs.EFT_VERSION }}-${{ needs.prepare.outputs.BUILD_DATE_TIME }}-artifact
|
|
||||||
release_name=${{ env.OUTPUT_DIR }}-${{ needs.prepare.outputs.SPT_VERSION }}-win-nightly-${{ steps.debug-info.outputs.COMMIT_ID }}-EFT${{ needs.prepare.outputs.EFT_VERSION }}-${{ needs.prepare.outputs.BUILD_DATE_TIME }}
|
|
||||||
echo "WIN_ARTIFACT=$artifact_name" >> $GITHUB_OUTPUT
|
|
||||||
echo "WIN_RELEASE=$release_name.zip" >> $GITHUB_OUTPUT
|
|
||||||
echo "WIN_RELEASE_FIKA=$release_name-fika.zip" >> $GITHUB_OUTPUT
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Artifact Winodws Server
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ steps.filename.outputs.WIN_ARTIFACT }}
|
|
||||||
path: ${{ env.SOURCECODE_DIR }}/project/${{ env.OUTPUT_DIR }}
|
|
||||||
overwrite: true
|
|
||||||
|
|
||||||
- name: Push Windows Server Code
|
|
||||||
run: |
|
|
||||||
cd ${{ env.SOURCECODE_DIR }}
|
|
||||||
git pull
|
|
||||||
REMOTE_URL="https://AirryCo:${{ secrets.AIRRYCO_TOKEN }}@github.com/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}.git"
|
|
||||||
git remote set-url origin "$REMOTE_URL"
|
|
||||||
git push
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
build-server-linux:
|
build-server-linux:
|
||||||
needs: [prepare, build-fika-server]
|
needs: [prepare, build-fika-server]
|
||||||
if: needs.prepare.outputs.PROCEED == 'true' || needs.prepare.outputs.PROCEED_FIKA == 'true'
|
if: needs.prepare.outputs.PROCEED == 'true' || needs.prepare.outputs.PROCEED_FIKA == 'true'
|
||||||
@@ -296,8 +179,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup Git Config
|
- name: Setup Git Config
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
@@ -467,6 +348,7 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
|
file: ./docker/Dockerfile-nightly
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: |
|
labels: |
|
||||||
@@ -480,7 +362,7 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
file: ./docker/Dockerfile-fika
|
file: ./docker/Dockerfile-nightly-fika
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta-fika.outputs.tags }}
|
tags: ${{ steps.meta-fika.outputs.tags }}
|
||||||
labels: |
|
labels: |
|
||||||
@@ -490,6 +372,107 @@ jobs:
|
|||||||
org.opencontainers.image.revision=${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID_WHOLE }}
|
org.opencontainers.image.revision=${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID_WHOLE }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
||||||
|
build-server-windows:
|
||||||
|
needs: [prepare, build-server-linux]
|
||||||
|
if: needs.prepare.outputs.PROCEED == 'true' || needs.prepare.outputs.PROCEED_FIKA == 'true'
|
||||||
|
runs-on: windows-latest
|
||||||
|
env:
|
||||||
|
OUTPUT_DIR: spt-server
|
||||||
|
SOURCECODE_DIR: c:/snapshot
|
||||||
|
outputs:
|
||||||
|
SPT_SERVER_COMMIT_TIME: ${{ steps.merge.outputs.SPT_SERVER_COMMIT_TIME }}
|
||||||
|
WIN_COMMIT_ID: ${{ steps.debug-info.outputs.COMMIT_ID }}
|
||||||
|
WIN_ARTIFACT: ${{ steps.filename.outputs.WIN_ARTIFACT }}
|
||||||
|
WIN_RELEASE_FILE: ${{ steps.filename.outputs.WIN_RELEASE }}
|
||||||
|
WIN_RELEASE_FIKA_FILE: ${{ steps.filename.outputs.WIN_RELEASE_FIKA }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Clone AirryCo's Server Code
|
||||||
|
run: |
|
||||||
|
git clone -b ${{ env.NIGHTLY_BRANCH }} ${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }} ${{ env.SOURCECODE_DIR }}
|
||||||
|
cd ${{ env.SOURCECODE_DIR }}
|
||||||
|
git lfs pull
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
# Modify the JSON file with PowerShell
|
||||||
|
- name: Modify JSON file with PowerShell
|
||||||
|
run: |
|
||||||
|
cd ${{ env.SOURCECODE_DIR }}/project/assets/configs
|
||||||
|
$json = Get-Content -Path "core.json" | ConvertFrom-Json
|
||||||
|
$json.projectName = "AirryCo's SPT Windows"
|
||||||
|
$json | ConvertTo-Json -Depth 10 | Set-Content -Path "core.json"
|
||||||
|
shell: pwsh
|
||||||
|
- name: Replace serverExeName
|
||||||
|
run: |
|
||||||
|
cd ${{ env.SOURCECODE_DIR }}/project
|
||||||
|
sed -i 's/SPT.Server/SPT.Server.exe/g' gulpfile.mjs
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20.11.1
|
||||||
|
|
||||||
|
- name: Runner Debug Information
|
||||||
|
id: debug-info
|
||||||
|
run: |
|
||||||
|
cp -v ${{ env.SOURCECODE_DIR }}/project/package.json .
|
||||||
|
cd ${{ env.SOURCECODE_DIR }}
|
||||||
|
echo "git version: $(git --version)"
|
||||||
|
echo "git lfs version: $(git-lfs --version)"
|
||||||
|
echo "node.js version: $(node --version)"
|
||||||
|
echo "npm version: $(npm --version)"
|
||||||
|
echo "latest commit hash: $(git rev-parse HEAD)"
|
||||||
|
echo "last commit message:" && git log -1 --pretty=%B
|
||||||
|
echo "COMMIT_ID=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Cache NPM Dependencies
|
||||||
|
id: cache-npm-dependencies
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{ env.SOURCECODE_DIR }}/project/node_modules
|
||||||
|
key: ${{ runner.os }}-npm-dependencies-${{ hashFiles('package.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-npm-dependencies-
|
||||||
|
|
||||||
|
- name: Install NPM Dependencies
|
||||||
|
if: steps.cache-npm-dependencies.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd ${{ env.SOURCECODE_DIR }}/project
|
||||||
|
npm install --legacy-peer-deps
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
- name: Build Windows Server
|
||||||
|
id: build-server
|
||||||
|
run: |
|
||||||
|
cd ${{ env.SOURCECODE_DIR }}/project
|
||||||
|
npm run build:release
|
||||||
|
ls -l build
|
||||||
|
mv build ${{ env.OUTPUT_DIR }}
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Generate Windows File Name
|
||||||
|
id: filename
|
||||||
|
run: |
|
||||||
|
artifact_name=${{ env.OUTPUT_DIR }}-${{ needs.prepare.outputs.SPT_VERSION }}-win-nightly-${{ steps.debug-info.outputs.COMMIT_ID }}-EFT${{ needs.prepare.outputs.EFT_VERSION }}-${{ needs.prepare.outputs.BUILD_DATE_TIME }}-artifact
|
||||||
|
release_name=${{ env.OUTPUT_DIR }}-${{ needs.prepare.outputs.SPT_VERSION }}-win-nightly-${{ steps.debug-info.outputs.COMMIT_ID }}-EFT${{ needs.prepare.outputs.EFT_VERSION }}-${{ needs.prepare.outputs.BUILD_DATE_TIME }}
|
||||||
|
echo "WIN_ARTIFACT=$artifact_name" >> $GITHUB_OUTPUT
|
||||||
|
echo "WIN_RELEASE=$release_name.zip" >> $GITHUB_OUTPUT
|
||||||
|
echo "WIN_RELEASE_FIKA=$release_name-fika.zip" >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Artifact Winodws Server
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ steps.filename.outputs.WIN_ARTIFACT }}
|
||||||
|
path: ${{ env.SOURCECODE_DIR }}/project/${{ env.OUTPUT_DIR }}
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
update-trigger-and-push:
|
update-trigger-and-push:
|
||||||
needs: [prepare, build-server-windows, build-docker-image-multi-arch]
|
needs: [prepare, build-server-windows, build-docker-image-multi-arch]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -515,7 +498,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
assemble-and-publish:
|
assemble-and-publish:
|
||||||
needs: [prepare, build-server-windows, build-server-linux, build-fika-server, build-docker-image-multi-arch, update-trigger-and-push]
|
needs: [prepare, build-fika-server, build-server-windows, build-server-linux, build-docker-image-multi-arch, update-trigger-and-push]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -561,12 +544,6 @@ jobs:
|
|||||||
zip -r ../${{ needs.build-server-linux.outputs.LINUX_RELEASE_FIKA_FILE }} *
|
zip -r ../${{ needs.build-server-linux.outputs.LINUX_RELEASE_FIKA_FILE }} *
|
||||||
ls -R ..
|
ls -R ..
|
||||||
|
|
||||||
- name: Short Hash
|
|
||||||
id: short-hash
|
|
||||||
run: |
|
|
||||||
fika_hash=${{ needs.prepare.outputs.FIKA_SERVER_COMMIT }}
|
|
||||||
echo "FIKA_HASH=${fika_hash:0:8}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Create Github Pre-release
|
- name: Create Github Pre-release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
@@ -580,11 +557,9 @@ jobs:
|
|||||||
|
|
||||||
[SPT/Server](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}) commit hash: [${{ needs.prepare.outputs.SPT_SERVER_COMMIT }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}/src/commit/${{ needs.prepare.outputs.SPT_SERVER_COMMIT }}), commit time: **${{ needs.build-server-linux.outputs.SPT_SERVER_COMMIT_TIME }}**
|
[SPT/Server](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}) commit hash: [${{ needs.prepare.outputs.SPT_SERVER_COMMIT }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}/src/commit/${{ needs.prepare.outputs.SPT_SERVER_COMMIT }}), commit time: **${{ needs.build-server-linux.outputs.SPT_SERVER_COMMIT_TIME }}**
|
||||||
|
|
||||||
[medusa/spt-server](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}) commit:
|
[AirryCo/spt-server](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}) commit: [${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/src/commit/${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }})
|
||||||
- linux: [${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/src/commit/${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }})
|
|
||||||
- windows: [${{ needs.build-server-windows.outputs.WIN_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/src/commit/${{ needs.build-server-windows.outputs.WIN_COMMIT_ID }})
|
|
||||||
|
|
||||||
Fika-Server: [${{ steps.short-hash.outputs.FIKA_HASH }}](https://github.com/project-fika/Fika-Server/tree/${{ needs.prepare.outputs.FIKA_SERVER_COMMIT }})
|
Fika-Server: [${{ ${{ needs.prepare.outputs.FIKA_SERVER_COMMIT }} }}](https://github.com/project-fika/Fika-Server/tree/${{ needs.prepare.outputs.FIKA_SERVER_COMMIT }})
|
||||||
|
|
||||||
Build time: ***${{ needs.prepare.outputs.BUILD_DATE_TIME }}***
|
Build time: ***${{ needs.prepare.outputs.BUILD_DATE_TIME }}***
|
||||||
|
|
||||||
@@ -612,9 +587,8 @@ jobs:
|
|||||||
> After downloading, please use extraction software like WinRAR or [7-Zip](https://www.7-zip.org/) to unzip the files, then copy them to the Tarkov root directory. Do not use Windows File Explorer to directly open and copy the files.
|
> After downloading, please use extraction software like WinRAR or [7-Zip](https://www.7-zip.org/) to unzip the files, then copy them to the Tarkov root directory. Do not use Windows File Explorer to directly open and copy the files.
|
||||||
|
|
||||||
Full Changelog:
|
Full Changelog:
|
||||||
- linux: [${{ needs.prepare.outputs.BUILT_HASH }}...${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/compare/${{ needs.prepare.outputs.BUILT_HASH }}...${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }})
|
- spt-server: [${{ needs.prepare.outputs.BUILT_HASH }}...${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/compare/${{ needs.prepare.outputs.BUILT_HASH }}...${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }})
|
||||||
- windows: [${{ needs.prepare.outputs.BUILT_HASH }}...${{ needs.build-server-windows.outputs.WIN_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/compare/${{ needs.prepare.outputs.BUILT_HASH }}...${{ needs.build-server-windows.outputs.WIN_COMMIT_ID }})
|
- fika-server: [${{ needs.prepare.outputs.BUILT_HASH_FIKA }}...${{ needs.prepare.outputs.FIKA_SERVER_COMMIT }}](https://github.com/project-fika/Fika-Server/compare/${{ needs.prepare.outputs.BUILT_HASH_FIKA }}...${{ needs.prepare.outputs.FIKA_SERVER_COMMIT }})
|
||||||
- fika-server: [${{ needs.prepare.outputs.BUILT_HASH_FIKA }}...${{ steps.short-hash.outputs.FIKA_HASH }}](https://github.com/project-fika/Fika-Server/compare/${{ needs.prepare.outputs.BUILT_HASH_FIKA }}...${{ steps.short-hash.outputs.FIKA_HASH }})
|
|
||||||
|
|
||||||
files: |
|
files: |
|
||||||
${{ needs.build-server-windows.outputs.WIN_RELEASE_FILE }}
|
${{ needs.build-server-windows.outputs.WIN_RELEASE_FILE }}
|
||||||
|
|||||||
387
.github/workflows/build-release-cron.yaml
vendored
387
.github/workflows/build-release-cron.yaml
vendored
@@ -11,7 +11,8 @@ env:
|
|||||||
SERVER_URL: https://github.com
|
SERVER_URL: https://github.com
|
||||||
REPOSITORY_SPT_SERVER: sp-tarkov/server
|
REPOSITORY_SPT_SERVER: sp-tarkov/server
|
||||||
REPOSITORY_SPT_SERVER_AIRRYCO: AirryCo/spt-server
|
REPOSITORY_SPT_SERVER_AIRRYCO: AirryCo/spt-server
|
||||||
RELEASE_BRANCH: 3.10.0-DEV
|
RELEASE_BRANCH: master
|
||||||
|
RELEASE_BRANCH_FIKA: main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
@@ -19,7 +20,9 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
PROCEED: ${{ steps.compare-tags.outputs.PROCEED }}
|
PROCEED: ${{ steps.compare-tags.outputs.PROCEED }}
|
||||||
BUILT_TAG: ${{ steps.compare-tags.outputs.BUILT_TAG }}
|
BUILT_TAG: ${{ steps.compare-tags.outputs.BUILT_TAG }}
|
||||||
|
BUILT_TAG_FIKA: ${{ steps.get-fika-tag.outputs.BUILT_TAG }}
|
||||||
TARGET_TAG: ${{ steps.compare-tags.outputs.TARGET_TAG }}
|
TARGET_TAG: ${{ steps.compare-tags.outputs.TARGET_TAG }}
|
||||||
|
TARGET_TAG_FIKA: ${{ steps.get-fika-tag.outputs.TARGET_TAG}}
|
||||||
|
|
||||||
SPT_VERSION: ${{ steps.versions.outputs.SPT_VERSION }}
|
SPT_VERSION: ${{ steps.versions.outputs.SPT_VERSION }}
|
||||||
EFT_VERSION: ${{ steps.versions.outputs.EFT_VERSION }}
|
EFT_VERSION: ${{ steps.versions.outputs.EFT_VERSION }}
|
||||||
@@ -45,7 +48,8 @@ jobs:
|
|||||||
- name: Compare Tags
|
- name: Compare Tags
|
||||||
id: compare-tags
|
id: compare-tags
|
||||||
run: |
|
run: |
|
||||||
server_last_built_tag=$(cat trigger.release)
|
source trigger.release
|
||||||
|
server_last_built_tag=$server
|
||||||
server_latest_tag=${{ steps.get-latest-tag.outputs.SPT_SERVER_LATEST_TAG }}
|
server_latest_tag=${{ steps.get-latest-tag.outputs.SPT_SERVER_LATEST_TAG }}
|
||||||
if [ "$server_last_built_tag" != "$server_latest_tag" ]; then
|
if [ "$server_last_built_tag" != "$server_latest_tag" ]; then
|
||||||
echo "✅ There is different between last-built-tag and lastest-tag, continue to build."
|
echo "✅ There is different between last-built-tag and lastest-tag, continue to build."
|
||||||
@@ -57,6 +61,16 @@ jobs:
|
|||||||
echo "PROCEED=false" >> $GITHUB_OUTPUT
|
echo "PROCEED=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
- name: Get Fika-Server Latest Tag
|
||||||
|
id: get-fika-tag
|
||||||
|
if: steps.compare-tags.outputs.PROCEED == 'true'
|
||||||
|
run: |
|
||||||
|
source trigger.release
|
||||||
|
fika_built_tag=$fika
|
||||||
|
fika_latest_tag=$(git ls-remote --tags https://github.com/project-fika/Fika-Server.git | sort -t/ -k3 -V | tail -n 1 | awk '{print $2}' | sed 's/refs\/tags\///')
|
||||||
|
echo "BUILT_TAG=$fika_built_tag" >> $GITHUB_OUTPUT
|
||||||
|
echo "TARGET_TAG=$fika_latest_tag" >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
- name: Extract versions
|
- name: Extract versions
|
||||||
id: versions
|
id: versions
|
||||||
if: steps.compare-tags.outputs.PROCEED == 'true'
|
if: steps.compare-tags.outputs.PROCEED == 'true'
|
||||||
@@ -87,113 +101,6 @@ jobs:
|
|||||||
echo "DATE_TIME=$(date +%Y%m%d%H%M%S)" >> $GITHUB_OUTPUT
|
echo "DATE_TIME=$(date +%Y%m%d%H%M%S)" >> $GITHUB_OUTPUT
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
build-server-windows:
|
|
||||||
needs: prepare
|
|
||||||
if: ${{ needs.prepare.outputs.PROCEED == 'true' }}
|
|
||||||
runs-on: windows-latest
|
|
||||||
env:
|
|
||||||
OUTPUT_DIR: spt-server
|
|
||||||
SOURCECODE_DIR: c:/code
|
|
||||||
outputs:
|
|
||||||
WIN_COMMIT_ID: ${{ steps.debug-info.outputs.COMMIT_ID }}
|
|
||||||
WIN_ARTIFACT: ${{ steps.filename.outputs.WIN_ARTIFACT }}
|
|
||||||
WIN_RELEASE_FILE: ${{ steps.filename.outputs.WIN_RELEASE }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup Git Config
|
|
||||||
run: |
|
|
||||||
git config --global user.name "github-actions[bot]"
|
|
||||||
git config --global user.email "bot@github.com"
|
|
||||||
|
|
||||||
- name: Clone AirroCo's Windows Server Code
|
|
||||||
run: |
|
|
||||||
git clone -b ${{ env.RELEASE_BRANCH }}_Win ${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }} ${{ env.SOURCECODE_DIR }}
|
|
||||||
cd ${{ env.SOURCECODE_DIR }}
|
|
||||||
git lfs pull
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20.11.1
|
|
||||||
|
|
||||||
- name: Merge Server Code From SPT
|
|
||||||
run: |
|
|
||||||
cd ${{ env.SOURCECODE_DIR }}
|
|
||||||
git pull
|
|
||||||
git fetch -u ${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}.git ${{ env.RELEASE_BRANCH }}:SPT-${{ env.RELEASE_BRANCH }}
|
|
||||||
git merge -m "🤖 Merge tag \`${{ needs.prepare.outputs.TARGET_TAG }}\` from SPT" --no-ff ${{ needs.prepare.outputs.TARGET_TAG }}
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Runner Debug Information
|
|
||||||
id: debug-info
|
|
||||||
run: |
|
|
||||||
cp -v ${{ env.SOURCECODE_DIR }}/project/package.json .
|
|
||||||
cd ${{ env.SOURCECODE_DIR }}
|
|
||||||
echo "git version: $(git --version)"
|
|
||||||
echo "git lfs version: $(git-lfs --version)"
|
|
||||||
echo "node.js version: $(node --version)"
|
|
||||||
echo "npm version: $(npm --version)"
|
|
||||||
echo "latest commit hash: $(git rev-parse HEAD)"
|
|
||||||
echo "last commit message:" && git log -1 --pretty=%B
|
|
||||||
echo "COMMIT_ID=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Cache NPM Dependencies
|
|
||||||
id: cache-npm-dependencies
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
${{ env.SOURCECODE_DIR }}/project/node_modules
|
|
||||||
key: ${{ runner.os }}-npm-dependencies-${{ hashFiles('package.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-npm-dependencies-
|
|
||||||
|
|
||||||
- name: Install NPM Dependencies
|
|
||||||
if: steps.cache-npm-dependencies.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
cd ${{ env.SOURCECODE_DIR }}/project
|
|
||||||
npm install
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: Build Windows Server
|
|
||||||
id: build-server
|
|
||||||
run: |
|
|
||||||
cd ${{ env.SOURCECODE_DIR }}/project
|
|
||||||
npm run build:release
|
|
||||||
ls -l build
|
|
||||||
mv build ${{ env.OUTPUT_DIR }}
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Generate Windows File Name
|
|
||||||
id: filename
|
|
||||||
run: |
|
|
||||||
artifact_name=${{ env.OUTPUT_DIR }}-${{ needs.prepare.outputs.TARGET_TAG }}-win-release-${{ steps.debug-info.outputs.COMMIT_ID }}-EFT${{ needs.prepare.outputs.EFT_VERSION }}-${{ needs.prepare.outputs.BUILD_DATE_TIME }}-artifact
|
|
||||||
release_name=${{ env.OUTPUT_DIR }}-${{ needs.prepare.outputs.TARGET_TAG }}-win-release-${{ steps.debug-info.outputs.COMMIT_ID }}-EFT${{ needs.prepare.outputs.EFT_VERSION }}-${{ needs.prepare.outputs.BUILD_DATE_TIME }}.zip
|
|
||||||
echo "WIN_ARTIFACT=$artifact_name" >> $GITHUB_OUTPUT
|
|
||||||
echo "WIN_RELEASE=$release_name" >> $GITHUB_OUTPUT
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Artifact Windows Server
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ steps.filename.outputs.WIN_ARTIFACT }}
|
|
||||||
path: ${{ env.SOURCECODE_DIR }}/project/${{ env.OUTPUT_DIR }}
|
|
||||||
overwrite: true
|
|
||||||
|
|
||||||
- name: Push Windows Server Code
|
|
||||||
run: |
|
|
||||||
cd ${{ env.SOURCECODE_DIR }}
|
|
||||||
git pull
|
|
||||||
REMOTE_URL="https://AirryCo:${{ secrets.AIRRYCO_TOKEN }}@github.com/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}.git"
|
|
||||||
git remote set-url origin "$REMOTE_URL"
|
|
||||||
git push
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
build-server-linux:
|
build-server-linux:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
if: ${{ needs.prepare.outputs.PROCEED == 'true' }}
|
if: ${{ needs.prepare.outputs.PROCEED == 'true' }}
|
||||||
@@ -211,12 +118,11 @@ jobs:
|
|||||||
LINUX_COMMIT_ID_WHOLE: ${{ steps.debug-info.outputs.COMMIT_ID_WHOLE }}
|
LINUX_COMMIT_ID_WHOLE: ${{ steps.debug-info.outputs.COMMIT_ID_WHOLE }}
|
||||||
LINUX_ARTIFACT: ${{ steps.filename.outputs.LINUX_ARTIFACT }}
|
LINUX_ARTIFACT: ${{ steps.filename.outputs.LINUX_ARTIFACT }}
|
||||||
LINUX_RELEASE_FILE: ${{ steps.filename.outputs.LINUX_RELEASE }}
|
LINUX_RELEASE_FILE: ${{ steps.filename.outputs.LINUX_RELEASE }}
|
||||||
|
LINUX_RELEASE_FIKA_FILE: ${{ steps.filename.outputs.LINUX_RELEASE_FIKA }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup Git Config
|
- name: Setup Git Config
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
@@ -287,9 +193,10 @@ jobs:
|
|||||||
id: filename
|
id: filename
|
||||||
run: |
|
run: |
|
||||||
artifact_name=${{ env.OUTPUT_DIR }}-${{ needs.prepare.outputs.TARGET_TAG }}-linux-release-${{ steps.debug-info.outputs.COMMIT_ID }}-EFT${{ needs.prepare.outputs.EFT_VERSION }}-${{ needs.prepare.outputs.BUILD_DATE_TIME }}-artifact
|
artifact_name=${{ env.OUTPUT_DIR }}-${{ needs.prepare.outputs.TARGET_TAG }}-linux-release-${{ steps.debug-info.outputs.COMMIT_ID }}-EFT${{ needs.prepare.outputs.EFT_VERSION }}-${{ needs.prepare.outputs.BUILD_DATE_TIME }}-artifact
|
||||||
release_name=${{ env.OUTPUT_DIR }}-${{ needs.prepare.outputs.TARGET_TAG }}-linux-release-${{ steps.debug-info.outputs.COMMIT_ID }}-EFT${{ needs.prepare.outputs.EFT_VERSION }}-${{ needs.prepare.outputs.BUILD_DATE_TIME }}.zip
|
release_name=${{ env.OUTPUT_DIR }}-${{ needs.prepare.outputs.TARGET_TAG }}-linux-release-${{ steps.debug-info.outputs.COMMIT_ID }}-EFT${{ needs.prepare.outputs.EFT_VERSION }}-${{ needs.prepare.outputs.BUILD_DATE_TIME }}
|
||||||
echo "LINUX_ARTIFACT=$artifact_name" >> $GITHUB_OUTPUT
|
echo "LINUX_ARTIFACT=$artifact_name" >> $GITHUB_OUTPUT
|
||||||
echo "LINUX_RELEASE=$release_name" >> $GITHUB_OUTPUT
|
echo "LINUX_RELEASE=$release_name.zip" >> $GITHUB_OUTPUT
|
||||||
|
echo "LINUX_RELEASE_FIKA=$release_name-fika.zip" >> $GITHUB_OUTPUT
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Artifact Linux Server
|
- name: Artifact Linux Server
|
||||||
@@ -327,8 +234,8 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# docker
|
# docker
|
||||||
- name: Extract metadata for Docker with bem version
|
- name: Extract metadata for Docker with release version
|
||||||
if: ${{ contains(needs.prepare.outputs.TARGET_TAG, 'BEM') }}
|
if: ${{ !contains(needs.prepare.outputs.TARGET_TAG, 'BEM') }}
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
@@ -339,9 +246,23 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}},value=${{ needs.prepare.outputs.TARGET_TAG }}
|
type=semver,pattern={{version}},value=${{ needs.prepare.outputs.TARGET_TAG }}
|
||||||
type=semver,pattern={{major}}.{{minor}},value=${{ needs.prepare.outputs.TARGET_TAG }}
|
type=semver,pattern={{major}}.{{minor}},value=${{ needs.prepare.outputs.TARGET_TAG }}
|
||||||
- name: Extract metadata for Docker with latest version
|
type=raw,value=latest
|
||||||
|
- name: Extract metadata for Docker with release version and fika built-in
|
||||||
if: ${{ !contains(needs.prepare.outputs.TARGET_TAG, 'BEM') }}
|
if: ${{ !contains(needs.prepare.outputs.TARGET_TAG, 'BEM') }}
|
||||||
id: meta-latest
|
id: meta-fika
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ env.DOCKERHUB_USER }}/${{ env.DOCKERHUB_REPOSITORY }}
|
||||||
|
ghcr.io/${{ env.GHCR_USER }}/${{ env.GHCR_REPOSITORY }}
|
||||||
|
registry.cn-shenzhen.aliyuncs.com/spt-server/spt-server
|
||||||
|
tags: |
|
||||||
|
type=semver,pattern={{version}}-fika,value=${{ needs.prepare.outputs.TARGET_TAG }}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}-fika,value=${{ needs.prepare.outputs.TARGET_TAG }}
|
||||||
|
type=raw,value=latest-fika
|
||||||
|
- name: Extract metadata for Docker with bem version
|
||||||
|
if: ${{ contains(needs.prepare.outputs.TARGET_TAG, 'BEM') }}
|
||||||
|
id: meta-bem
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
@@ -351,7 +272,18 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}},value=${{ needs.prepare.outputs.TARGET_TAG }}
|
type=semver,pattern={{version}},value=${{ needs.prepare.outputs.TARGET_TAG }}
|
||||||
type=semver,pattern={{major}}.{{minor}},value=${{ needs.prepare.outputs.TARGET_TAG }}
|
type=semver,pattern={{major}}.{{minor}},value=${{ needs.prepare.outputs.TARGET_TAG }}
|
||||||
type=raw,value=latest
|
- name: Extract metadata for Docker with bem version and fika built-in
|
||||||
|
if: ${{ contains(needs.prepare.outputs.TARGET_TAG, 'BEM') }}
|
||||||
|
id: meta-bem-fika
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ env.DOCKERHUB_USER }}/${{ env.DOCKERHUB_REPOSITORY }}
|
||||||
|
ghcr.io/${{ env.GHCR_USER }}/${{ env.GHCR_REPOSITORY }}
|
||||||
|
registry.cn-shenzhen.aliyuncs.com/spt-server/spt-server
|
||||||
|
tags: |
|
||||||
|
type=semver,pattern={{version}}-fika,value=${{ needs.prepare.outputs.TARGET_TAG }}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}-fika,value=${{ needs.prepare.outputs.TARGET_TAG }}
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
@@ -379,20 +311,7 @@ jobs:
|
|||||||
username: ${{ secrets.ALIYUN_REGISTRY_USER }}
|
username: ${{ secrets.ALIYUN_REGISTRY_USER }}
|
||||||
password: ${{ secrets.ALIYUN_REGISTRY_TOKEN }}
|
password: ${{ secrets.ALIYUN_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Build and Push For BEM
|
- name: Build and Push For Release
|
||||||
if: ${{ contains(needs.prepare.outputs.TARGET_TAG, 'BEM') }}
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: ./docker
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: |
|
|
||||||
${{ steps.meta.outputs.labels }}
|
|
||||||
org.opencontainers.image.source=https://github.com/AirryCo/spt-server
|
|
||||||
org.opencontainers.image.url=https://github.com/AirryCo/spt-server
|
|
||||||
org.opencontainers.image.revision=${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID_WHOLE }}
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
- name: Build and Push For Latest
|
|
||||||
if: ${{ !contains(needs.prepare.outputs.TARGET_TAG, 'BEM') }}
|
if: ${{ !contains(needs.prepare.outputs.TARGET_TAG, 'BEM') }}
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@@ -405,6 +324,147 @@ jobs:
|
|||||||
org.opencontainers.image.url=https://github.com/AirryCo/spt-server
|
org.opencontainers.image.url=https://github.com/AirryCo/spt-server
|
||||||
org.opencontainers.image.revision=${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID_WHOLE }}
|
org.opencontainers.image.revision=${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID_WHOLE }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
- name: Build and Push For Release With Fika
|
||||||
|
if: ${{ !contains(needs.prepare.outputs.TARGET_TAG, 'BEM') }}
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: ./docker
|
||||||
|
file: ./docker/Dockerfile-fika
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta-fika.outputs.tags }}
|
||||||
|
labels: |
|
||||||
|
${{ steps.meta-fika.outputs.labels }}
|
||||||
|
org.opencontainers.image.source=https://github.com/AirryCo/spt-server
|
||||||
|
org.opencontainers.image.url=https://github.com/AirryCo/spt-server
|
||||||
|
org.opencontainers.image.revision=${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID_WHOLE }}
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
- name: Build and Push For BEM
|
||||||
|
if: ${{ contains(needs.prepare.outputs.TARGET_TAG, 'BEM') }}
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: ./docker
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta-bem.outputs.tags }}
|
||||||
|
labels: |
|
||||||
|
${{ steps.meta-bem.outputs.labels }}
|
||||||
|
org.opencontainers.image.source=https://github.com/AirryCo/spt-server
|
||||||
|
org.opencontainers.image.url=https://github.com/AirryCo/spt-server
|
||||||
|
org.opencontainers.image.revision=${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID_WHOLE }}
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
- name: Build and Push For BEM With Fika
|
||||||
|
if: ${{ contains(needs.prepare.outputs.TARGET_TAG, 'BEM') }}
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: ./docker
|
||||||
|
file: ./docker/Dockerfile-fika
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: |
|
||||||
|
${{ steps.meta.outputs.labels }}
|
||||||
|
org.opencontainers.image.source=https://github.com/AirryCo/spt-server
|
||||||
|
org.opencontainers.image.url=https://github.com/AirryCo/spt-server
|
||||||
|
org.opencontainers.image.revision=${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID_WHOLE }}
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
||||||
|
build-server-windows:
|
||||||
|
needs: [prepare, build-server-linux]
|
||||||
|
if: ${{ needs.prepare.outputs.PROCEED == 'true' }}
|
||||||
|
runs-on: windows-latest
|
||||||
|
env:
|
||||||
|
OUTPUT_DIR: spt-server
|
||||||
|
SOURCECODE_DIR: c:/snapshot
|
||||||
|
outputs:
|
||||||
|
WIN_COMMIT_ID: ${{ steps.debug-info.outputs.COMMIT_ID }}
|
||||||
|
WIN_ARTIFACT: ${{ steps.filename.outputs.WIN_ARTIFACT }}
|
||||||
|
WIN_RELEASE_FILE: ${{ steps.filename.outputs.WIN_RELEASE }}
|
||||||
|
WIN_RELEASE_FIKA_FILE: ${{ steps.filename.outputs.WIN_RELEASE_FIKA }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Clone AirroCo's Server Code
|
||||||
|
run: |
|
||||||
|
git clone -b ${{ env.RELEASE_BRANCH }} ${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }} ${{ env.SOURCECODE_DIR }}
|
||||||
|
cd ${{ env.SOURCECODE_DIR }}
|
||||||
|
git lfs pull
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
# Modify the JSON file with PowerShell
|
||||||
|
- name: Modify JSON file with PowerShell
|
||||||
|
run: |
|
||||||
|
cd ${{ env.SOURCECODE_DIR }}/project/assets/configs
|
||||||
|
$json = Get-Content -Path "core.json" | ConvertFrom-Json
|
||||||
|
$json.projectName = "AirryCo's SPT Windows"
|
||||||
|
$json | ConvertTo-Json -Depth 10 | Set-Content -Path "core.json"
|
||||||
|
shell: pwsh
|
||||||
|
- name: Replace serverExeName
|
||||||
|
run: |
|
||||||
|
cd ${{ env.SOURCECODE_DIR }}/project
|
||||||
|
sed -i 's/SPT.Server/SPT.Server.exe/g' gulpfile.mjs
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20.11.1
|
||||||
|
|
||||||
|
- name: Runner Debug Information
|
||||||
|
id: debug-info
|
||||||
|
run: |
|
||||||
|
cp -v ${{ env.SOURCECODE_DIR }}/project/package.json .
|
||||||
|
cd ${{ env.SOURCECODE_DIR }}
|
||||||
|
echo "git version: $(git --version)"
|
||||||
|
echo "git lfs version: $(git-lfs --version)"
|
||||||
|
echo "node.js version: $(node --version)"
|
||||||
|
echo "npm version: $(npm --version)"
|
||||||
|
echo "latest commit hash: $(git rev-parse HEAD)"
|
||||||
|
echo "last commit message:" && git log -1 --pretty=%B
|
||||||
|
echo "COMMIT_ID=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Cache NPM Dependencies
|
||||||
|
id: cache-npm-dependencies
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{ env.SOURCECODE_DIR }}/project/node_modules
|
||||||
|
key: ${{ runner.os }}-npm-dependencies-${{ hashFiles('package.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-npm-dependencies-
|
||||||
|
|
||||||
|
- name: Install NPM Dependencies
|
||||||
|
if: steps.cache-npm-dependencies.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd ${{ env.SOURCECODE_DIR }}/project
|
||||||
|
npm install
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
- name: Build Windows Server
|
||||||
|
id: build-server
|
||||||
|
run: |
|
||||||
|
cd ${{ env.SOURCECODE_DIR }}/project
|
||||||
|
npm run build:release
|
||||||
|
ls -l build
|
||||||
|
mv build ${{ env.OUTPUT_DIR }}
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Generate Windows File Name
|
||||||
|
id: filename
|
||||||
|
run: |
|
||||||
|
artifact_name=${{ env.OUTPUT_DIR }}-${{ needs.prepare.outputs.TARGET_TAG }}-win-release-${{ steps.debug-info.outputs.COMMIT_ID }}-EFT${{ needs.prepare.outputs.EFT_VERSION }}-${{ needs.prepare.outputs.BUILD_DATE_TIME }}-artifact
|
||||||
|
release_name=${{ env.OUTPUT_DIR }}-${{ needs.prepare.outputs.TARGET_TAG }}-win-release-${{ steps.debug-info.outputs.COMMIT_ID }}-EFT${{ needs.prepare.outputs.EFT_VERSION }}-${{ needs.prepare.outputs.BUILD_DATE_TIME }}
|
||||||
|
echo "WIN_ARTIFACT=$artifact_name" >> $GITHUB_OUTPUT
|
||||||
|
echo "WIN_RELEASE=$release_name.zip" >> $GITHUB_OUTPUT
|
||||||
|
echo "WIN_RELEASE_FIKA=$release_name-fika.zip" >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Artifact Windows Server
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ steps.filename.outputs.WIN_ARTIFACT }}
|
||||||
|
path: ${{ env.SOURCECODE_DIR }}/project/${{ env.OUTPUT_DIR }}
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
assemble-and-publish:
|
assemble-and-publish:
|
||||||
needs: [prepare, build-server-windows, build-server-linux, build-docker-image-multi-arch]
|
needs: [prepare, build-server-windows, build-server-linux, build-docker-image-multi-arch]
|
||||||
@@ -423,7 +483,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git pull
|
git pull
|
||||||
rm trigger.release
|
rm trigger.release
|
||||||
echo "${{ needs.prepare.outputs.TARGET_TAG }}" > trigger.release
|
echo "server=${{ needs.prepare.outputs.TARGET_TAG }}" > trigger.release
|
||||||
|
echo "fika=${{ needs.prepare.outputs.TARGET_TAG_FIKA }}" >> trigger.release
|
||||||
git add trigger.release
|
git add trigger.release
|
||||||
git commit -m "🤖 bump to \`${{ needs.prepare.outputs.TARGET_TAG }}\`."
|
git commit -m "🤖 bump to \`${{ needs.prepare.outputs.TARGET_TAG }}\`."
|
||||||
git push
|
git push
|
||||||
@@ -441,15 +502,31 @@ jobs:
|
|||||||
name: ${{ needs.build-server-linux.outputs.LINUX_ARTIFACT }}
|
name: ${{ needs.build-server-linux.outputs.LINUX_ARTIFACT }}
|
||||||
path: linux
|
path: linux
|
||||||
|
|
||||||
|
- name: Download Fika-Server
|
||||||
|
run: |
|
||||||
|
wget https://github.com/project-fika/Fika-Server/releases/download/${{ needs.prepare.outputs.TARGET_TAG_FIKA }}/fika-server.zip
|
||||||
|
|
||||||
- name: Compress Releases
|
- name: Compress Releases
|
||||||
id: compress-release
|
id: compress-release
|
||||||
run: |
|
run: |
|
||||||
cd windows
|
cd windows
|
||||||
|
unzip ../fika-server.zip
|
||||||
zip -r ../${{ needs.build-server-windows.outputs.WIN_RELEASE_FILE }} *
|
zip -r ../${{ needs.build-server-windows.outputs.WIN_RELEASE_FILE }} *
|
||||||
cd ../linux
|
cd ../linux
|
||||||
|
unzip ../fika-server.zip
|
||||||
zip -r ../${{ needs.build-server-linux.outputs.LINUX_RELEASE_FILE }} *
|
zip -r ../${{ needs.build-server-linux.outputs.LINUX_RELEASE_FILE }} *
|
||||||
ls -R ..
|
ls -R ..
|
||||||
shell: bash
|
shell: bash
|
||||||
|
- name: Compress Releases With Fika
|
||||||
|
id: compress-release-fika
|
||||||
|
run: |
|
||||||
|
cd windows
|
||||||
|
unzip ../fika-server.zip
|
||||||
|
zip -r ../${{ needs.build-server-windows.outputs.WIN_RELEASE_FIKA_FILE }} *
|
||||||
|
cd ../linux
|
||||||
|
unzip ../fika-server.zip
|
||||||
|
zip -r ../${{ needs.build-server-linux.outputs.LINUX_RELEASE_FIKA_FILE }} *
|
||||||
|
ls -R ..
|
||||||
|
|
||||||
- name: Create Github Pre-release
|
- name: Create Github Pre-release
|
||||||
id: create_pre_release
|
id: create_pre_release
|
||||||
@@ -466,9 +543,9 @@ jobs:
|
|||||||
|
|
||||||
[SPT/Server](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}) commit hash: [${{ needs.prepare.outputs.SPT_SERVER_COMMIT }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}/src/commit/${{ needs.prepare.outputs.SPT_SERVER_COMMIT }}), commit time: **${{ needs.prepare.outputs.SPT_SERVER_COMMIT_TIME }}**
|
[SPT/Server](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}) commit hash: [${{ needs.prepare.outputs.SPT_SERVER_COMMIT }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}/src/commit/${{ needs.prepare.outputs.SPT_SERVER_COMMIT }}), commit time: **${{ needs.prepare.outputs.SPT_SERVER_COMMIT_TIME }}**
|
||||||
|
|
||||||
[medusa/spt-server](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}) commit:
|
[AirryCo/spt-server](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}) commit: [${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/src/commit/${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }})
|
||||||
- linux: [${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/src/commit/${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }})
|
|
||||||
- windows: [${{ needs.build-server-windows.outputs.WIN_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/src/commit/${{ needs.build-server-windows.outputs.WIN_COMMIT_ID }})
|
Fika-Server: [${{ needs.prepare.outputs.TARGET_TAG_FIKA }}](https://github.com/project-fika/Fika-Server/tree/${{ needs.prepare.outputs.TARGET_TAG_FIKA }})
|
||||||
|
|
||||||
Build time: ***${{ needs.prepare.outputs.BUILD_DATE_TIME }}***
|
Build time: ***${{ needs.prepare.outputs.BUILD_DATE_TIME }}***
|
||||||
|
|
||||||
@@ -483,13 +560,22 @@ jobs:
|
|||||||
docker pull registry.cn-shenzhen.aliyuncs.com/spt-server/spt-server:${{ needs.prepare.outputs.TARGET_TAG }}
|
docker pull registry.cn-shenzhen.aliyuncs.com/spt-server/spt-server:${{ needs.prepare.outputs.TARGET_TAG }}
|
||||||
```
|
```
|
||||||
|
|
||||||
Full Changelog:
|
Fika-Server built-in:
|
||||||
- linux: [${{ needs.prepare.outputs.BUILT_TAG }}....${{ needs.prepare.outputs.TARGET_TAG }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/compare/${{ needs.prepare.outputs.BUILT_TAG }}...${{ needs.prepare.outputs.TARGET_TAG }})
|
|
||||||
- windows: [${{ needs.prepare.outputs.BUILT_TAG }}....${{ needs.build-server-windows.outputs.WIN_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/compare/${{ needs.prepare.outputs.BUILT_TAG }}...${{ needs.build-server-windows.outputs.WIN_COMMIT_ID }})
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker pull stblog/spt-server:${{ needs.prepare.outputs.TARGET_TAG }}-fika
|
||||||
|
docker pull ghcr.io/airryco/spt-server:${{ needs.prepare.outputs.TARGET_TAG }}-fika
|
||||||
|
docker pull registry.cn-shenzhen.aliyuncs.com/spt-server/spt-server:${{ needs.prepare.outputs.TARGET_TAG }}-fika
|
||||||
|
```
|
||||||
|
|
||||||
|
Full Changelog:
|
||||||
|
- spt-server: [${{ needs.prepare.outputs.BUILT_TAG }}....${{ needs.prepare.outputs.TARGET_TAG }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/compare/${{ needs.prepare.outputs.BUILT_TAG }}...${{ needs.prepare.outputs.TARGET_TAG }})
|
||||||
|
- fika-server: [${{ needs.prepare.outputs.BUILT_TAG_FIKA }}....${{ needs.prepare.outputs.TARGET_TAG_FIKA }}](https://github.com/project-fika/Fika-Server/compare/${{ needs.prepare.outputs.BUILT_TAG }}...${{ needs.prepare.outputs.TARGET_TAG }})
|
||||||
files: |
|
files: |
|
||||||
${{ needs.build-server-windows.outputs.WIN_RELEASE_FILE }}
|
${{ needs.build-server-windows.outputs.WIN_RELEASE_FILE }}
|
||||||
${{ needs.build-server-linux.outputs.LINUX_RELEASE_FILE }}
|
${{ needs.build-server-linux.outputs.LINUX_RELEASE_FILE }}
|
||||||
|
${{ needs.build-server-windows.outputs.WIN_RELEASE_FIKA_FILE }}
|
||||||
|
${{ needs.build-server-linux.outputs.LINUX_RELEASE_FIKA_FILE }}
|
||||||
|
|
||||||
- name: Create Github Release
|
- name: Create Github Release
|
||||||
id: create_release
|
id: create_release
|
||||||
@@ -502,13 +588,13 @@ jobs:
|
|||||||
body: |
|
body: |
|
||||||
SPT: ***${{ needs.prepare.outputs.SPT_VERSION }}***
|
SPT: ***${{ needs.prepare.outputs.SPT_VERSION }}***
|
||||||
|
|
||||||
|
Tarkov: ***${{ needs.prepare.outputs.EFT_VERSION }}***
|
||||||
|
|
||||||
[SPT/Server](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}) commit hash: [${{ needs.prepare.outputs.SPT_SERVER_COMMIT }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}/src/commit/${{ needs.prepare.outputs.SPT_SERVER_COMMIT }}), commit time: **${{ needs.prepare.outputs.SPT_SERVER_COMMIT_TIME }}**
|
[SPT/Server](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}) commit hash: [${{ needs.prepare.outputs.SPT_SERVER_COMMIT }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER }}/src/commit/${{ needs.prepare.outputs.SPT_SERVER_COMMIT }}), commit time: **${{ needs.prepare.outputs.SPT_SERVER_COMMIT_TIME }}**
|
||||||
|
|
||||||
[medusa/spt-server](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}) commit:
|
[AirryCo/spt-server](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}) commit: [${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/src/commit/${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }})
|
||||||
- linux: [${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/src/commit/${{ needs.build-server-linux.outputs.LINUX_COMMIT_ID }})
|
|
||||||
- windows: [${{ needs.build-server-windows.outputs.WIN_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/src/commit/${{ needs.build-server-windows.outputs.WIN_COMMIT_ID }})
|
|
||||||
|
|
||||||
Tarkov: ***${{ needs.prepare.outputs.EFT_VERSION }}***
|
Fika-Server: [${{ needs.prepare.outputs.TARGET_TAG_FIKA }}](https://github.com/project-fika/Fika-Server/tree/${{ needs.prepare.outputs.TARGET_TAG_FIKA }})
|
||||||
|
|
||||||
Build time: ***${{ needs.prepare.outputs.BUILD_DATE_TIME }}***
|
Build time: ***${{ needs.prepare.outputs.BUILD_DATE_TIME }}***
|
||||||
|
|
||||||
@@ -523,10 +609,19 @@ jobs:
|
|||||||
docker pull registry.cn-shenzhen.aliyuncs.com/spt-server/spt-server:${{ needs.prepare.outputs.TARGET_TAG }}
|
docker pull registry.cn-shenzhen.aliyuncs.com/spt-server/spt-server:${{ needs.prepare.outputs.TARGET_TAG }}
|
||||||
```
|
```
|
||||||
|
|
||||||
Full Changelog:
|
Fika-Server built-in:
|
||||||
- linux: [${{ needs.prepare.outputs.BUILT_TAG }}....${{ needs.prepare.outputs.TARGET_TAG }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/compare/${{ needs.prepare.outputs.BUILT_TAG }}...${{ needs.prepare.outputs.TARGET_TAG }})
|
|
||||||
- windows: [${{ needs.prepare.outputs.BUILT_TAG }}....${{ needs.build-server-windows.outputs.WIN_COMMIT_ID }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/compare/${{ needs.prepare.outputs.BUILT_TAG }}...${{ needs.build-server-windows.outputs.WIN_COMMIT_ID }})
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker pull stblog/spt-server:${{ needs.prepare.outputs.TARGET_TAG }}-fika
|
||||||
|
docker pull ghcr.io/airryco/spt-server:${{ needs.prepare.outputs.TARGET_TAG }}-fika
|
||||||
|
docker pull registry.cn-shenzhen.aliyuncs.com/spt-server/spt-server:${{ needs.prepare.outputs.TARGET_TAG }}-fika
|
||||||
|
```
|
||||||
|
|
||||||
|
Full Changelog:
|
||||||
|
- spt-server: [${{ needs.prepare.outputs.BUILT_TAG }}....${{ needs.prepare.outputs.TARGET_TAG }}](${{ env.SERVER_URL }}/${{ env.REPOSITORY_SPT_SERVER_AIRRYCO }}/compare/${{ needs.prepare.outputs.BUILT_TAG }}...${{ needs.prepare.outputs.TARGET_TAG }})
|
||||||
|
- fika-server: [${{ needs.prepare.outputs.BUILT_TAG_FIKA }}....${{ needs.prepare.outputs.TARGET_TAG_FIKA }}](https://github.com/project-fika/Fika-Server/compare/${{ needs.prepare.outputs.BUILT_TAG }}...${{ needs.prepare.outputs.TARGET_TAG }})
|
||||||
files: |
|
files: |
|
||||||
${{ needs.build-server-windows.outputs.WIN_RELEASE_FILE }}
|
${{ needs.build-server-windows.outputs.WIN_RELEASE_FILE }}
|
||||||
${{ needs.build-server-linux.outputs.LINUX_RELEASE_FILE }}
|
${{ needs.build-server-linux.outputs.LINUX_RELEASE_FILE }}
|
||||||
|
${{ needs.build-server-windows.outputs.WIN_RELEASE_FIKA_FILE }}
|
||||||
|
${{ needs.build-server-linux.outputs.LINUX_RELEASE_FIKA_FILE }}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM node:20.11.1-alpine AS server-builder
|
FROM node:20.11.1-alpine AS server-builder
|
||||||
RUN apk add --no-cache git git-lfs && \
|
RUN apk add --no-cache git git-lfs && \
|
||||||
git clone -b 3.10.0-DEV https://github.com/AirryCo/spt-server.git /spt-server && \
|
git clone -b master https://github.com/AirryCo/spt-server.git /spt-server && \
|
||||||
cd /spt-server && git lfs pull && \
|
cd /spt-server && git lfs pull && \
|
||||||
cd project && \
|
cd project && \
|
||||||
npm install && npm run build:release
|
npm install && npm run build:release
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM node:20.11.1-alpine AS fika-builder
|
FROM node:20.11.1-alpine AS fika-builder
|
||||||
RUN apk add --no-cache git git-lfs unzip && \
|
RUN apk add --no-cache git git-lfs unzip && \
|
||||||
git clone -b spt-3.10 https://github.com/project-fika/Fika-Server.git /fika-server && \
|
git clone -b main https://github.com/project-fika/Fika-Server.git /fika-server && \
|
||||||
cd /fika-server && \
|
cd /fika-server && \
|
||||||
npm install && npm run build && \
|
npm install && npm run build && \
|
||||||
mkdir output && cd output && unzip /fika-server/dist/fika-server.zip
|
mkdir output && cd output && unzip /fika-server/dist/fika-server.zip
|
||||||
|
|||||||
18
docker/Dockerfile-nightly
Normal file
18
docker/Dockerfile-nightly
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
FROM node:20.11.1-alpine AS server-builder
|
||||||
|
RUN apk add --no-cache git git-lfs && \
|
||||||
|
git clone -b 3.10.0-DEV https://github.com/AirryCo/spt-server.git /spt-server && \
|
||||||
|
cd /spt-server && git lfs pull && \
|
||||||
|
cd project && \
|
||||||
|
npm install && npm run build:release
|
||||||
|
|
||||||
|
FROM debian:bookworm-slim
|
||||||
|
LABEL author="AirryCo <henry@stblog.com.cn>"
|
||||||
|
ENV TZ=Asia/Shanghai
|
||||||
|
COPY --from=server-builder /spt-server/project/build/ /app/spt-server/
|
||||||
|
VOLUME /opt/spt-server
|
||||||
|
WORKDIR /opt/spt-server
|
||||||
|
EXPOSE 6969
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
26
docker/Dockerfile-nightly-fika
Normal file
26
docker/Dockerfile-nightly-fika
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
FROM node:20.11.1-alpine AS fika-builder
|
||||||
|
RUN apk add --no-cache git git-lfs unzip && \
|
||||||
|
git clone -b spt-3.10 https://github.com/project-fika/Fika-Server.git /fika-server && \
|
||||||
|
cd /fika-server && \
|
||||||
|
npm install && npm run build && \
|
||||||
|
mkdir output && cd output && unzip /fika-server/dist/fika-server.zip
|
||||||
|
|
||||||
|
FROM node:20.11.1-alpine AS server-builder
|
||||||
|
RUN apk add --no-cache git git-lfs && \
|
||||||
|
git clone -b 3.10.0-DEV https://github.com/AirryCo/spt-server.git /spt-server && \
|
||||||
|
cd /spt-server && git lfs pull && \
|
||||||
|
cd project && \
|
||||||
|
npm install && npm run build:release
|
||||||
|
|
||||||
|
FROM debian:bookworm-slim
|
||||||
|
LABEL author="AirryCo <henry@stblog.com.cn>"
|
||||||
|
ENV TZ=Asia/Shanghai
|
||||||
|
COPY --from=server-builder /spt-server/project/build/ /app/spt-server/
|
||||||
|
COPY --from=fika-builder /fika-server/output/ /app/spt-server/
|
||||||
|
VOLUME /opt/spt-server
|
||||||
|
WORKDIR /opt/spt-server
|
||||||
|
EXPOSE 6969
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
@@ -1 +1,2 @@
|
|||||||
3.10.0-BEM-20241125
|
server=3.10.0-BEM-20241125
|
||||||
|
fika=v2.2.8
|
||||||
|
|||||||
Reference in New Issue
Block a user