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" \
# 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
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
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 && \
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