Files
mpq-packager/.gitea/workflows/ci.yml
T
paste 7b9a70f4fe
CI / build-and-smoke (push) Failing after 35s
Pin GITHUB_SERVER_URL to /git subpath so checkout/API resolve
act_runner reports GITHUB_SERVER_URL without the instance's /git subpath,
so actions/checkout cloned https://octowow.st/paste/... (404). Pin the
correct base at job level until the server ROOT_URL is fixed.
2026-06-25 22:39:38 -05:00

50 lines
1.8 KiB
YAML

# CI for the packager itself: build the Docker image and smoke-test that it
# produces a non-empty patch-Z.mpq from the test fixture.
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
build-and-smoke:
runs-on: ubuntu-latest
# This Gitea instance is served under the /git subpath, but act_runner
# reports GITHUB_SERVER_URL as https://octowow.st (subpath dropped), which
# makes actions/checkout (and API calls) build the wrong URL. Pin it.
# The real fix is the server's ROOT_URL = https://octowow.st/git/ (admin).
env:
GITHUB_SERVER_URL: https://octowow.st/git
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build image
run: docker build -t mpq-packager:ci .
- name: Package the fixture
run: |
set -euo pipefail
docker run --rm \
-e INPUT_MANIFEST=mpq.yaml \
-e INPUT_VERSION=v0.0.0-ci \
-e INPUT_OUT_DIR=/work/dist \
-e GITHUB_WORKSPACE=/work \
-v "$PWD/test:/work" \
mpq-packager:ci
- name: Assert archive is valid and contains the expected file
run: |
set -euo pipefail
test -s test/dist/patch-Z.mpq
echo "size: $(stat -c%s test/dist/patch-Z.mpq) bytes"
# Read the archive back with StormLib (mpqpack --list/--cat).
docker run --rm --entrypoint mpqpack -v "$PWD/test:/work" mpq-packager:ci \
--list /work/dist/patch-Z.mpq | tee /tmp/list.txt
grep -q 'Interface\\AddOns\\Fixture\\Hello.lua' /tmp/list.txt
docker run --rm --entrypoint mpqpack -v "$PWD/test:/work" mpq-packager:ci \
--cat /work/dist/patch-Z.mpq 'Interface\AddOns\Fixture\Hello.lua' \
| grep -q 'VERSION = "v0.0.0-ci"'
echo "OK: archive valid, path + substitution confirmed"