Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bbbd217247 | |||
| 5e8a34bd6f | |||
| 65d9cbaee6 | |||
| 9e9c1dc5e8 | |||
| 95b679cf0e | |||
| 7bdb331cc4 | |||
| 4a6ba85539 | |||
| 7dcdb2dd9e | |||
| 9a13ec1134 |
@@ -5,11 +5,11 @@ on:
|
|||||||
- 'develop'
|
- 'develop'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FULL_TAG: git.mrmeeb.stream/mrmeeb/gitea-act-runner
|
FULL_TAG: git.mrmeeb.stream/mrmeeb/gitea-act-runner:develop
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
"Build Image":
|
"Build Image":
|
||||||
runs-on: [ubuntu-docker-latest, linux/amd64]
|
runs-on: ubuntu-docker-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
@@ -19,22 +19,14 @@ jobs:
|
|||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: git.mrmeeb.stream
|
registry: git.mrmeeb.stream
|
||||||
username: ${{ env.GITHUB_ACTOR }}
|
username: ${{ secrets.GT_USERNAME }}
|
||||||
password: ${{ secrets.GTCR_TOKEN }}
|
password: ${{ secrets.GT_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
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ env.FULL_TAG }}
|
||||||
provenance: false
|
provenance: false
|
||||||
- name: Notify on failure
|
- name: Notify on failure
|
||||||
uses: rjstone/discord-webhook-notify@v1
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
@@ -46,7 +38,7 @@ jobs:
|
|||||||
username: Gitea
|
username: Gitea
|
||||||
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
||||||
"Notify":
|
"Notify":
|
||||||
runs-on: [ubuntu-docker-latest, linux/amd64]
|
runs-on: ubuntu-docker-latest
|
||||||
needs: ["Build Image"]
|
needs: ["Build Image"]
|
||||||
steps:
|
steps:
|
||||||
- name: Notify of success
|
- name: Notify of success
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
"Build Image":
|
"Build Image":
|
||||||
runs-on: [ubuntu-docker-latest, linux/amd64]
|
runs-on: ubuntu-docker-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
username: Gitea
|
username: Gitea
|
||||||
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
||||||
"Notify":
|
"Notify":
|
||||||
runs-on: [ubuntu-docker-latest, linux/amd64]
|
runs-on: ubuntu-docker-latest
|
||||||
needs: ["Build Image"]
|
needs: ["Build Image"]
|
||||||
steps:
|
steps:
|
||||||
- name: Notify of success
|
- name: Notify of success
|
||||||
|
|||||||
+10
-14
@@ -1,8 +1,8 @@
|
|||||||
FROM golang:1.25-alpine3.23 as builder
|
FROM golang:1.22-alpine3.18 as builder
|
||||||
# Do not remove `git` here, it is required for getting runner version when executing `make build`
|
# Do not remove `git` here, it is required for getting runner version when executing `make build`
|
||||||
RUN apk add --no-cache make git
|
RUN apk add --no-cache make git
|
||||||
|
|
||||||
ARG ACT_VERSION=0.2.11
|
ARG ACT_VERSION=0.2.6
|
||||||
|
|
||||||
RUN git clone --depth 1 --branch v${ACT_VERSION} https://gitea.com/gitea/act_runner /opt/src/act_runner
|
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
|
RUN make clean && make build
|
||||||
|
|
||||||
FROM docker:27.5.1-dind
|
FROM docker:25.0.3-dind
|
||||||
USER root
|
USER root
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
git bash supervisor python3 py3-pip
|
git bash supervisor
|
||||||
|
|
||||||
RUN pip3 install --break-system-packages supervisord-dependent-startup
|
|
||||||
|
|
||||||
COPY --from=builder /opt/src/act_runner/act_runner /usr/local/bin/act_runner
|
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/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/run.sh /opt/act/run.sh
|
||||||
COPY --from=builder /opt/src/act_runner/scripts/rootless.sh /opt/act/rootless.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 * * *"
|
ENV DOCKER_PRUNE_INTERVAL="0 0 * * *"
|
||||||
|
|
||||||
# Supress tini warning
|
|
||||||
ENV TINI_SUBREAPER=true
|
|
||||||
|
|
||||||
# Add Crontab for root user
|
# Add Crontab for root user
|
||||||
RUN echo "${DOCKER_PRUNE_INTERVAL} echo Pruning docker volumes && docker volume prune -af" > .crontab.txt && crontab .crontab.txt
|
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
|
# Remove warning from supervisord about running as root
|
||||||
RUN sed -i '/\[supervisord\]/a user=root' /etc/supervisord.conf
|
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"]
|
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
||||||
+1
-11
@@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"extends": [":automergeMinor", ":automergePr", ":automergeRequireAllStatusChecks", ":dependencyDashboard", ":disableRateLimiting", ":rebaseStalePrs"],
|
"extends": [":automergeMinor", ":automergePr", ":automergeRequireAllStatusChecks", ":dependencyDashboard", ":disableRateLimiting", ":rebaseStalePrs"],
|
||||||
"baseBranches": ["develop"],
|
"baseBranches": ["develop"],
|
||||||
"major": {
|
"major": {
|
||||||
"dependencyDashboardApproval": true
|
"dependencyDashboardApproval": true
|
||||||
},
|
},
|
||||||
"minimumReleaseAge": "7 days",
|
|
||||||
"customManagers": [
|
"customManagers": [
|
||||||
{
|
{
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
@@ -12,16 +12,6 @@
|
|||||||
"matchStrings": ["ARG ACT_VERSION=(?<currentValue>.*)"],
|
"matchStrings": ["ARG ACT_VERSION=(?<currentValue>.*)"],
|
||||||
"datasourceTemplate": "gitea-releases",
|
"datasourceTemplate": "gitea-releases",
|
||||||
"depNameTemplate": "gitea/act_runner"
|
"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": [
|
"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