]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix broken actions-runner
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Fri, 4 Jul 2025 22:50:52 +0000 (00:50 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sun, 6 Jul 2025 20:04:14 +0000 (22:04 +0200)
arch/s390/self-hosted-builder/actions-runner
arch/s390/self-hosted-builder/actions-runner-rebuild.sh
arch/s390/self-hosted-builder/actions-runner.Dockerfile

index 8d194bac3fb9efde1a2e85b01975acd5ca8ff28f..aabc8025474ab72ac14018361660494af2e79741 100755 (executable)
@@ -21,15 +21,18 @@ fi
 TOKEN_FILE=registration-token.json
 if [ -f $TOKEN_FILE ]; then
     set +e
-    EXPIRES=$(jq --raw-output .EXPIRES "$TOKEN_FILE" 2>/dev/null)
+    EXPIRES=$(jq --raw-output .expires_at "$TOKEN_FILE" 2>/dev/null)
     STATUS=$?
     set -e
 else
     STATUS=1
+    EXPIRES=""
 fi
-if [[ $STATUS -ne 0 || $(date +%s) -ge $(date -d "$EXPIRES" +%s) ]]; then
+
+if [[ $STATUS -ne 0 || -z "$EXPIRES" || "$EXPIRES" == "null" || $(date +%s) -ge $(date -d "$EXPIRES" +%s) ]]; then
     # Refresh the cached registration token.
     curl \
+        -sS \
         -X POST \
         -H "Accept: application/vnd.github+json" \
         -H "Authorization: Bearer $PAT_TOKEN" \
index 703448fca0f6b8a3a06b8d0c6403f351adf30032..af02d87e2cc6fcb205581ac3af6db3fbf7061ac5 100644 (file)
@@ -33,7 +33,7 @@ podman build --squash -f actions-runner.Dockerfile --tag zlib-ng/actions-runner
 
 # Create new container
 podman create --replace --name=gaplib-actions-runner --env-file=/etc/actions-runner --init \
-       --volume=actions-runner-temp:/home/actions-runner zlib-ng/actions-runner 2>&1 | tee -a /var/log/actions-runner-build.log
+       zlib-ng/actions-runner 2>&1 | tee -a /var/log/actions-runner-build.log
 
 # Start service
 systemctl start actions-runner || true
index 1a9c3a4eba191546647926ff0bb1ac84237f0742..3f80097094caf773b77d28365887ebf5cc1f9d38 100644 (file)
@@ -4,7 +4,8 @@ FROM    almalinux:9
 
 RUN     dnf update -y -q && \
         dnf install -y -q --enablerepo=crb wget git which sudo jq sed \
-            cmake make automake autoconf m4 libtool ninja-build python3-pip \
+            cmake make automake autoconf m4 libtool ninja-build \
+            python3-pip python3-devel python3-lxml \
             gcc gcc-c++ clang llvm-toolset glibc-all-langpacks langpacks-en \
             glibc-static libstdc++-static libstdc++-devel libxslt-devel libxml2-devel
 
@@ -14,9 +15,10 @@ RUN     dnf install -y -q dotnet-sdk-8.0 && \
 RUN     cd /tmp && \
         git clone -q https://github.com/actions/runner && \
         cd runner && \
-        git checkout $(git tag | grep "^v[0-9]\+\.[0-9]\+\.[0-9]\+$" | sort -V | tail -1) -b build && \
+        git checkout $(git tag --sort=-v:refname | grep '^v[0-9]' | head -n1) && \
+        git log -n 1 && \
         wget https://github.com/anup-kodlekere/gaplib/raw/refs/heads/main/patches/runner-main-sdk8-s390x.patch -O runner-sdk-8.patch && \
-        git apply runner-sdk-8.patch && \
+        git apply --whitespace=nowarn runner-sdk-8.patch && \
         sed -i'' -e /version/s/8......\"$/$8.0.100\"/ src/global.json
 
 RUN     cd /tmp/runner/src && \
@@ -30,16 +32,6 @@ RUN     useradd -c "Action Runner" -m actions-runner && \
 RUN     tar -xf /tmp/runner/_package/*.tar.gz -C /home/actions-runner && \
         chown -R actions-runner:actions-runner /home/actions-runner
 
-#VOLUME  /home/actions-runner
-
-# Workaround: Install custom clang version to avoid compiler bug, ref #1852
-RUN     mkdir /tmp/clang
-
-COPY    clang/*.rpm /tmp/clang
-
-RUN     dnf -y upgrade /tmp/clang/*.rpm && \
-        rm -rf /tmp/clang
-
 # Cleanup
 RUN     rm -rf /tmp/runner /var/cache/dnf/* /tmp/runner.patch /tmp/global.json && \
         dnf clean all