Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e060a4a588 | |||
| 60f0728208 | |||
| 5e8a34bd6f | |||
| 65d9cbaee6 | |||
| 9e9c1dc5e8 | |||
| 95b679cf0e | |||
| 7bdb331cc4 | |||
| 4a6ba85539 | |||
| 7dcdb2dd9e | |||
| 9a13ec1134 |
@@ -5,11 +5,11 @@ on:
|
||||
- 'develop'
|
||||
|
||||
env:
|
||||
FULL_TAG: git.mrmeeb.stream/mrmeeb/gitea-act-runner
|
||||
FULL_TAG: git.mrmeeb.stream/mrmeeb/gitea-act-runner:develop
|
||||
|
||||
jobs:
|
||||
"Build Image":
|
||||
runs-on: [ubuntu-docker-latest, linux/amd64]
|
||||
runs-on: ubuntu-docker-latest
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
@@ -19,22 +19,14 @@ jobs:
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.mrmeeb.stream
|
||||
username: ${{ env.GITHUB_ACTOR }}
|
||||
password: ${{ secrets.GTCR_TOKEN }}
|
||||
- name: Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.FULL_TAG }}
|
||||
tags: |
|
||||
type=sha,prefix=develop-
|
||||
type=raw,value=develop
|
||||
username: ${{ secrets.GT_USERNAME }}
|
||||
password: ${{ secrets.GT_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
tags: ${{ env.FULL_TAG }}
|
||||
provenance: false
|
||||
- name: Notify on failure
|
||||
uses: rjstone/discord-webhook-notify@v1
|
||||
@@ -46,7 +38,7 @@ jobs:
|
||||
username: Gitea
|
||||
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
||||
"Notify":
|
||||
runs-on: [ubuntu-docker-latest, linux/amd64]
|
||||
runs-on: ubuntu-docker-latest
|
||||
needs: ["Build Image"]
|
||||
steps:
|
||||
- name: Notify of success
|
||||
|
||||
@@ -9,7 +9,7 @@ env:
|
||||
|
||||
jobs:
|
||||
"Build Image":
|
||||
runs-on: [ubuntu-docker-latest, linux/amd64]
|
||||
runs-on: ubuntu-docker-latest
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
username: Gitea
|
||||
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
||||
"Notify":
|
||||
runs-on: [ubuntu-docker-latest, linux/amd64]
|
||||
runs-on: ubuntu-docker-latest
|
||||
needs: ["Build Image"]
|
||||
steps:
|
||||
- name: Notify of success
|
||||
|
||||
+10
-14
@@ -1,8 +1,8 @@
|
||||
FROM golang:1.25-alpine3.22 as builder
|
||||
FROM golang:1.21-alpine3.18 as builder
|
||||
# Do not remove `git` here, it is required for getting runner version when executing `make build`
|
||||
RUN apk add --no-cache make git
|
||||
|
||||
ARG ACT_VERSION=0.4.1
|
||||
ARG ACT_VERSION=0.2.10
|
||||
|
||||
RUN git clone --depth 1 --branch v${ACT_VERSION} https://gitea.com/gitea/act_runner /opt/src/act_runner
|
||||
|
||||
@@ -10,33 +10,29 @@ WORKDIR /opt/src/act_runner
|
||||
|
||||
RUN make clean && make build
|
||||
|
||||
FROM docker:27.5.1-dind
|
||||
FROM docker:25.0.5-dind
|
||||
USER root
|
||||
RUN apk add --no-cache \
|
||||
git bash supervisor python3 py3-pip
|
||||
|
||||
RUN pip3 install --break-system-packages supervisord-dependent-startup
|
||||
git bash supervisor
|
||||
|
||||
COPY --from=builder /opt/src/act_runner/act_runner /usr/local/bin/act_runner
|
||||
COPY --from=builder /opt/src/act_runner/scripts/supervisord.conf /etc/supervisord.conf
|
||||
COPY --from=builder /opt/src/act_runner/scripts/run.sh /opt/act/run.sh
|
||||
COPY --from=builder /opt/src/act_runner/scripts/rootless.sh /opt/act/rootless.sh
|
||||
|
||||
COPY /root /
|
||||
|
||||
RUN chmod +x /healthcheck.sh
|
||||
|
||||
ENV DOCKER_PRUNE_INTERVAL="0 0 * * *"
|
||||
|
||||
# Supress tini warning
|
||||
ENV TINI_SUBREAPER=true
|
||||
|
||||
# Add Crontab for root user
|
||||
RUN echo "${DOCKER_PRUNE_INTERVAL} echo Pruning docker volumes && docker volume prune -af" > .crontab.txt && crontab .crontab.txt
|
||||
|
||||
# Remove warning from supervisord about running as root
|
||||
RUN sed -i '/\[supervisord\]/a user=root' /etc/supervisord.conf
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=15s --start-period=30s --retries=3 CMD "/healthcheck.sh"
|
||||
# Add Cron to supervisord
|
||||
RUN echo "" >> /etc/supervisord.conf && \
|
||||
echo "[program:cron]" >> /etc/supervisord.conf && \
|
||||
echo "command=/usr/sbin/crond -f" >> /etc/supervisord.conf && \
|
||||
echo "stdout_logfile=/dev/fd/1" >> /etc/supervisord.conf && \
|
||||
echo "stdout_logfile_maxbytes=0" >> /etc/supervisord.conf
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
||||
+2
-12
@@ -1,10 +1,10 @@
|
||||
|
||||
{
|
||||
"extends": [":automergeMinor", ":automergePr", ":automergeRequireAllStatusChecks", ":dependencyDashboard", ":disableRateLimiting", ":rebaseStalePrs"],
|
||||
"baseBranches": ["develop"],
|
||||
"major": {
|
||||
"dependencyDashboardApproval": true
|
||||
},
|
||||
"minimumReleaseAge": "7 days",
|
||||
"customManagers": [
|
||||
{
|
||||
"customType": "regex",
|
||||
@@ -12,17 +12,7 @@
|
||||
"matchStrings": ["ARG ACT_VERSION=(?<currentValue>.*)"],
|
||||
"datasourceTemplate": "gitea-releases",
|
||||
"depNameTemplate": "gitea/act_runner"
|
||||
},
|
||||
{
|
||||
"description": "Manage Alpine OS versions in container image tags",
|
||||
"customType": "regex",
|
||||
"fileMatch": ["Dockerfile$"],
|
||||
"matchStrings": [
|
||||
"FROM\\s+(?<depName>[\\S]+?):(?<currentValue>[^@\\s]+)(?:@(?<currentDigest>sha256:[a-f0-9]+))?"
|
||||
],
|
||||
"versioningTemplate": "regex:^(?<compatibility>[\\S]*\\d+\\.\\d+(?:\\.\\d+)?(?:[\\S]*)?-alpine-?)(?<major>\\d+)\\.(?<minor>\\d+)(?:\\.(?<patch>\\d+))?$",
|
||||
"datasourceTemplate": "docker"
|
||||
}
|
||||
}
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
[program:act_runner]
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
redirect_stderr=true
|
||||
command=/opt/act/rootless.sh
|
||||
dependent_startup=true
|
||||
dependent_startup_wait_for=dockerd:running
|
||||
autostart=false
|
||||
@@ -1,5 +0,0 @@
|
||||
[program:cron]
|
||||
command=/usr/sbin/crond -f
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
redirect_stderr=true
|
||||
@@ -1,8 +0,0 @@
|
||||
[program:dockerd]
|
||||
command=/usr/local/bin/dockerd-entrypoint.sh
|
||||
stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/dev/fd/1
|
||||
redirect_stderr=true
|
||||
startsecs=20
|
||||
dependent_startup=true
|
||||
autostart=false
|
||||
@@ -1,28 +0,0 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/dev/null
|
||||
logfile_maxbytes=0
|
||||
|
||||
[include]
|
||||
files = /etc/supervisor.d/*.conf
|
||||
|
||||
[unix_http_server]
|
||||
file=/run/supervisord.sock
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///run/supervisord.sock
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
#[eventlistener:processes]
|
||||
#command=bash -c "echo READY && read line && kill -SIGQUIT $PPID"
|
||||
#events=PROCESS_STATE_STOPPED,PROCESS_STATE_EXITED,PROCESS_STATE_FATAL
|
||||
|
||||
[eventlistener:dependentstartup]
|
||||
command=python -m supervisord_dependent_startup
|
||||
autostart=true
|
||||
autorestart=unexpected
|
||||
startretries=0
|
||||
exitcodes=0,3
|
||||
events=PROCESS_STATE
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check docker socket is running
|
||||
ls -l /run | grep docker.sock
|
||||
|
||||
# Check act is running
|
||||
/usr/bin/supervisorctl status act_runner | grep RUNNING
|
||||
Reference in New Issue
Block a user