Files
CTI34-KPLIB-Ruha/.gitea/workflows/build.yml
T
MrFastwind 5fdb54cb88
Build Mission PBO / lint (push) Successful in 8s
Build Mission PBO / pack (push) Successful in 7s
Build Mission PBO / deploy (push) Successful in 7s
ci: fix pipefail killing lint step before grep check, uncomment artifact upload
- Add '|| true' to SQFVM pipeline so pipefail doesn't kill the step
  before we can grep for [ERR] lines
- Uncomment lint log artifact upload step
- description.ext false positive filtered by grep -v
2026-07-24 19:04:25 +02:00

97 lines
2.7 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)
# pipefail would kill this step on SQFVM's non-zero exit before we can check the log
/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 || true
# 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/