Преглед на файлове

fix(ci): make details check run dev commands for every server (#5224)

The shared-directory runner toggled .dev-debug on each server, so every
second server skipped parse-game-details and query-raw (Unknown command,
exit 0). Only enable developer mode when it is not already on.

Pass CI through sudo in the legacy job so check_system_dir does not fail
servers with a systemdir below serverfiles.

Drop the apt cache step: saving /var/cache/apt/archives always failed on
root-owned entries and warned on every shard.
Daniel Gibbs преди 1 ден
родител
ревизия
4e863ec555
променени са 2 файла, в които са добавени 2 реда и са изтрити 8 реда
  1. 1 1
      .github/scripts/details-check-run.sh
  2. 1 7
      .github/workflows/action-details-check.yml

+ 1 - 1
.github/scripts/details-check-run.sh

@@ -28,7 +28,7 @@ for shortname in "$@"; do
 	gameserver="${shortname}server"
 	echo "::group::${gameserver}"
 	./linuxgsm.sh "${gameserver}"
-	./"${gameserver}" developer
+	[ -f .dev-debug ] || ./"${gameserver}" developer
 
 	servercfg=$(sed -n "/^\<servercfgdefault\>/ { s/.*= *\"\?\([^\"']*\)\"\?/\1/p;q }" "lgsm/config-lgsm/${gameserver}/_default.cfg")
 	if [ -n "${servercfg}" ]; then

+ 1 - 7
.github/workflows/action-details-check.yml

@@ -104,12 +104,6 @@ jobs:
         with:
           ref: ${{ env.LGSM_REF }}
 
-      - name: Cache apt packages
-        uses: actions/cache@v6
-        with:
-          path: /var/cache/apt/archives
-          key: apt-${{ runner.os }}-libxml2-utils-jq
-
       - name: Install dependencies
         run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libxml2-utils jq
 
@@ -144,5 +138,5 @@ jobs:
           echo "linuxgsm ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/linuxgsm
           chown -R linuxgsm:linuxgsm "${GITHUB_WORKSPACE}"
           chmod a+w "${GITHUB_STEP_SUMMARY}"
-          sudo -u linuxgsm -H env LGSM_REF="${LGSM_REF}" GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" GITHUB_STEP_SUMMARY="${GITHUB_STEP_SUMMARY}" \
+          sudo -u linuxgsm -H env CI="${CI}" LGSM_REF="${LGSM_REF}" GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" GITHUB_STEP_SUMMARY="${GITHUB_STEP_SUMMARY}" \
             "${GITHUB_WORKSPACE}/.github/scripts/details-check-run.sh" ${{ needs.create-matrix.outputs.legacy }}