Files
CTI34-KPLIB-Ruha/.gitea/workflows/build.yml
T
MrFastwind 54c24088f0
Build Mission PBO / lint (push) Failing after 6s
Build Mission PBO / pack (push) Has been skipped
Build Mission PBO / deploy (push) Has been skipped
adds lint check on build
2026-07-24 19:00:54 +02:00

96 lines
2.6 KiB
YAML

name: Build Mission PBO
on:
push:
branches: [main, master]
tags: ["v*"]
workflow_dispatch:
env:
PBO_NAME: "KPLib-Ruha.ruha.pbo"
SQFVM_VERSION: "v2026.04.03-ed9f5f5"
SQFVM_URL: "https://github.com/SQFvm/runtime/releases/download/v2026.04.03-ed9f5f5/sqfvm_linux_x64_gcc.zip"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download SQFVM
run: |
curl -sL "$SQFVM_URL" -o /tmp/sqfvm.zip
unzip -o /tmp/sqfvm.zip -d /tmp/sqfvm
chmod +x /tmp/sqfvm/sqfvm_linux_x64_gcc/sqfvm
- name: Run SQFVM lint
run: |
SRC="$(realpath src)"
ARGS=()
while IFS= read -r -d '' f; do
ARGS+=(-i "$f")
done < <(find "$SRC" -name "*.sqf" -print0)
/tmp/sqfvm/sqfvm_linux_x64_gcc/sqfvm \
-a --parse-only --no-execute-print \
--input-config "$SRC/description.ext" \
"${ARGS[@]}" 2>&1 | tee lint_output.log
# Filter known false positive: SQFVM config parser chokes on & in author string
if grep -v "description.ext" lint_output.log | grep -q "^\[ERR\]"; then
echo "::error::SQFVM found syntax errors"
exit 1
fi
# - name: Upload lint log
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: sqfvm-lint.log
# path: lint_output.log
# if-no-files-found: warn
pack:
needs: [lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: mkdir build
- name: Pack mission folder into PBO
uses: docker://arwynfr/armake2:debian
with:
args: pack src "build/${{ env.PBO_NAME }}"
- name: Verify PBO integrity
uses: docker://arwynfr/armake2:debian
with:
args: inspect "build/${{ env.PBO_NAME }}"
- name: Upload PBO as artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.PBO_NAME }}
path: build/${{ env.PBO_NAME }}
if-no-files-found: error
deploy:
needs: [pack]
runs-on: ubuntu-latest
steps:
- name: Download PBO artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.PBO_NAME }}
- name: Deploy to game server via SCP
uses: appleboy/scp-action@v1
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
password: ${{ secrets.SERVER_PASSWORD }}
# key: ${{ secrets.SSH_PRIVATE_KEY }}
source: ${{ env.PBO_NAME }}
target: /home/arma3server/serverfiles/mpmissions/