Compare commits

...
15 Commits
Author SHA1 Message Date
pi-ux-ce 35bdf934a5 change registration otken and manually delete the file .runner inside the runner pvc 2026-09-14 09:57:52 +01:00
pi-ux-ce 31a18f31b3 remove deploy remote-buildkitd 2026-09-14 09:34:45 +01:00
pi-ux-ce 5fd237002f change url for the runner 2026-09-14 09:33:49 +01:00
pi-ux-ce acc548410e upgrading to latest 2026-08-19 11:45:15 +01:00
pi-ux-ce faf7131f1f increase memory 2026-08-17 09:47:58 +01:00
pi-ux-ce bc166eefcf add changes 2026-08-17 09:46:57 +01:00
pi-ux-ce e6d2b11ea3 adding new labels to run on debian and on the host 2026-01-19 11:56:38 +00:00
pi-ux-ce 77de451d8b update the tag for gitea runner 2025-03-10 09:21:32 +00:00
pi-ux-ce 107107c8e3 remove comments 2025-01-14 21:05:21 +00:00
pi-ux-ce aa177b2b0c add changes 2025-01-14 21:04:43 +00:00
pi-ux-ce 13b9570649 add limit 2024-10-31 08:46:56 +00:00
pi-ux-ce fe646e7923 remove the helm to avoid confusion 2024-10-31 08:43:46 +00:00
pi-ux-ce a98ede395b add before changes 2024-10-31 08:42:22 +00:00
pi-ux-ce 3e139ade6c deletion 2024-10-31 08:42:02 +00:00
pi-ux-ce edaa8b457c add before deletion 2024-10-31 08:41:52 +00:00
8 changed files with 30762 additions and 4232 deletions
+38 -11
View File
@@ -20,7 +20,7 @@ spec:
spec:
containers:
- name: gitea-webserver
image: gitea/gitea:latest
image: gitea/gitea:1.27.0
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
@@ -61,18 +61,20 @@ spec:
# mountPath: /usr/src/gitea/data
- name: gitea-data
mountPath: /data/
# resources:
# limits:
# cpu: 250m
# memory: 250Mi
- name: gitea-documents-backup
mountPath: /backup
resources:
limits:
cpu: 500m
memory: 1000Mi
volumes:
- name: gitea-data
persistentVolumeClaim:
claimName: gitea-data
- name: gitea-documents-backup
persistentVolumeClaim:
claimName: gitea-documents-backup
---
apiVersion: apps/v1
kind: Deployment
@@ -89,17 +91,22 @@ spec:
labels:
app: gitea-runner
spec:
nodeName: kube-master
containers:
- name: gitea-runner
image: gitea/act_runner:nightly
#image: gitea/act_runner:nightly
image: gitea/act_runner:latest
securityContext:
privileged: true
runAsUser: 0
imagePullPolicy: IfNotPresent
env:
- name: CONFIG_FILE
value: /config/config.yaml
- name: GITEA_INSTANCE_URL
value: "https://gitea.tryton.geeraert.eu/"
value: "https://gitea.geeraert.eu/"
- name: GITEA_RUNNER_REGISTRATION_TOKEN
value: "2lLHg3Zt4mqjz04cBVIi6UI11cDOwIrwvNY6FMTH"
value: "rqi4mFW8LXoc5MhIrUD1rjzdmKVY8n9X14BP6sWd"
- name: GITEA_RUNNER_NAME
value: "runner"
- name: GITEA_RUNNER_LABELS
@@ -111,6 +118,10 @@ spec:
mountPath: /var/run/docker.sock
- name: gitea-runner-configfile
mountPath: /config
resources:
limits:
# cpu: 500m
memory: 1000Mi
volumes:
- name: gitea-var-docker-sock
hostPath:
@@ -123,6 +134,7 @@ spec:
name: gitea-runner-configfile
defaultMode: 0555
---
apiVersion: v1
kind: Service
@@ -136,3 +148,18 @@ spec:
protocol: TCP
selector:
app: gitea-webserver
---
apiVersion: v1
kind: Service
metadata:
name: buildkitd
namespace: gitea
spec:
ports:
- port: 1234
targetPort: buildkitd-port
protocol: TCP
selector:
app: remote-buildkitd
+105
View File
@@ -0,0 +1,105 @@
# Example configuration file, it's safe to copy this as the default config file without any modification.
# You don't have to copy this file to your instance,
# just run `./act_runner generate-config > config.yaml` to generate a config file.
log:
# The level of logging, can be trace, debug, info, warn, error, fatal
level: info
runner:
# Where to store the registration result.
file: .runner
# Execute how many tasks concurrently at the same time.
capacity: 1
# Extra environment variables to run jobs.
envs:
A_TEST_ENV_NAME_1: a_test_env_value_1
A_TEST_ENV_NAME_2: a_test_env_value_2
# Extra environment variables to run jobs from a file.
# It will be ignored if it's empty or the file doesn't exist.
env_file: .env
# The timeout for a job to be finished.
# Please note that the Gitea instance also has a timeout (3h by default) for the job.
# So the job could be stopped by the Gitea instance if it's timeout is shorter than this.
timeout: 3h
# The timeout for the runner to wait for running jobs to finish when shutting down.
# Any running jobs that haven't finished after this timeout will be cancelled.
shutdown_timeout: 0s
# Whether skip verifying the TLS certificate of the Gitea instance.
insecure: false
# The timeout for fetching the job from the Gitea instance.
fetch_timeout: 5s
# The interval for fetching the job from the Gitea instance.
fetch_interval: 2s
# The labels of a runner are used to determine which jobs the runner can run, and how to run them.
# Like: "macos-arm64:host" or "ubuntu-latest:docker://gitea/runner-images:ubuntu-latest"
# Find more images provided by Gitea at https://gitea.com/gitea/runner-images .
# If it's empty when registering, it will ask for inputting labels.
# If it's empty when execute `daemon`, will use labels in `.runner` file.
labels:
- "ubuntu-latest:docker://gitea/runner-images:ubuntu-latest"
- "custom-runner-debian-slim:docker://gitea.tryton.geeraert.eu/pi-ux-ce/custom-runner-debian-slim:latest"
- "ubuntu-22.04:docker://gitea/runner-images:ubuntu-22.04"
- "ubuntu-20.04:docker://gitea/runner-images:ubuntu-20.04"
# - "ubuntu-latest:docker://debian:stable-slim"
- "host-runner:host"
cache:
# Enable cache server to use actions/cache.
enabled: true
# The directory to store the cache data.
# If it's empty, the cache data will be stored in $HOME/.cache/actcache.
dir: ""
# The host of the cache server.
# It's not for the address to listen, but the address to connect from job containers.
# So 0.0.0.0 is a bad choice, leave it empty to detect automatically.
host: ""
# The port of the cache server.
# 0 means to use a random available port.
port: 0
# The external cache server URL. Valid only when enable is true.
# If it's specified, act_runner will use this URL as the ACTIONS_CACHE_URL rather than start a server by itself.
# The URL should generally end with "/".
external_server: ""
container:
# Specifies the network to which the container will connect.
# Could be host, bridge or the name of a custom network.
# If it's empty, act_runner will create a network automatically.
network: ""
# Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker).
privileged: false
# And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).
options: '--volume /mnt/runner-cache:/toolcache'
# The parent directory of a job's working directory.
# NOTE: There is no need to add the first '/' of the path as act_runner will add it automatically.
# If the path starts with '/', the '/' will be trimmed.
# For example, if the parent directory is /path/to/my/dir, workdir_parent should be path/to/my/dir
# If it's empty, /workspace will be used.
workdir_parent:
# Volumes (including bind mounts) can be mounted to containers. Glob syntax is supported, see https://github.com/gobwas/glob
# You can specify multiple volumes. If the sequence is empty, no volumes can be mounted.
# For example, if you only allow containers to mount the `data` volume and all the json files in `/src`, you should change the config to:
valid_volumes:
- '/mnt/runner-cache/**'
# - data
# - /src/*.json
# If you want to allow any volume, please use the following configuration:
# valid_volumes:
# - '**'
# valid_volumes: []
# overrides the docker client host with the specified one.
# If it's empty, act_runner will find an available docker host automatically.
# If it's "-", act_runner will find an available docker host automatically, but the docker host won't be mounted to the job containers and service containers.
# If it's not empty or "-", the specified docker host will be used. An error will be returned if it doesn't work.
docker_host: ""
# Pull docker image(s) even if already present
force_pull: false
# Rebuild docker image(s) even if already present
force_rebuild: false
host:
# The parent directory of a job's working directory.
# If it's empty, $HOME/.cache/act/ will be used.
workdir_parent:
+105
View File
@@ -0,0 +1,105 @@
# Example configuration file, it's safe to copy this as the default config file without any modification.
# You don't have to copy this file to your instance,
# just run `./act_runner generate-config > config.yaml` to generate a config file.
log:
# The level of logging, can be trace, debug, info, warn, error, fatal
level: info
runner:
# Where to store the registration result.
file: .runner
# Execute how many tasks concurrently at the same time.
capacity: 1
# Extra environment variables to run jobs.
envs:
A_TEST_ENV_NAME_1: a_test_env_value_1
A_TEST_ENV_NAME_2: a_test_env_value_2
# Extra environment variables to run jobs from a file.
# It will be ignored if it's empty or the file doesn't exist.
env_file: .env
# The timeout for a job to be finished.
# Please note that the Gitea instance also has a timeout (3h by default) for the job.
# So the job could be stopped by the Gitea instance if it's timeout is shorter than this.
timeout: 3h
# The timeout for the runner to wait for running jobs to finish when shutting down.
# Any running jobs that haven't finished after this timeout will be cancelled.
shutdown_timeout: 0s
# Whether skip verifying the TLS certificate of the Gitea instance.
insecure: false
# The timeout for fetching the job from the Gitea instance.
fetch_timeout: 5s
# The interval for fetching the job from the Gitea instance.
fetch_interval: 2s
# The labels of a runner are used to determine which jobs the runner can run, and how to run them.
# Like: "macos-arm64:host" or "ubuntu-latest:docker://gitea/runner-images:ubuntu-latest"
# Find more images provided by Gitea at https://gitea.com/gitea/runner-images .
# If it's empty when registering, it will ask for inputting labels.
# If it's empty when execute `daemon`, will use labels in `.runner` file.
labels:
- "ubuntu-latest:docker://gitea/runner-images:ubuntu-latest"
- "ubuntu-latest:docker://debian:stable-slim"
- "ubuntu-latest:docker://debian:stable-slim"
- "host-runner:host"
- "ubuntu-22.04:docker://gitea/runner-images:ubuntu-22.04"
- "ubuntu-20.04:docker://gitea/runner-images:ubuntu-20.04"
cache:
# Enable cache server to use actions/cache.
enabled: true
# The directory to store the cache data.
# If it's empty, the cache data will be stored in $HOME/.cache/actcache.
dir: ""
# The host of the cache server.
# It's not for the address to listen, but the address to connect from job containers.
# So 0.0.0.0 is a bad choice, leave it empty to detect automatically.
host: ""
# The port of the cache server.
# 0 means to use a random available port.
port: 0
# The external cache server URL. Valid only when enable is true.
# If it's specified, act_runner will use this URL as the ACTIONS_CACHE_URL rather than start a server by itself.
# The URL should generally end with "/".
external_server: ""
container:
# Specifies the network to which the container will connect.
# Could be host, bridge or the name of a custom network.
# If it's empty, act_runner will create a network automatically.
network: ""
# Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker).
privileged: false
# And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).
options: '--volume /mnt/runner-cache:/toolcache'
# The parent directory of a job's working directory.
# NOTE: There is no need to add the first '/' of the path as act_runner will add it automatically.
# If the path starts with '/', the '/' will be trimmed.
# For example, if the parent directory is /path/to/my/dir, workdir_parent should be path/to/my/dir
# If it's empty, /workspace will be used.
workdir_parent:
# Volumes (including bind mounts) can be mounted to containers. Glob syntax is supported, see https://github.com/gobwas/glob
# You can specify multiple volumes. If the sequence is empty, no volumes can be mounted.
# For example, if you only allow containers to mount the `data` volume and all the json files in `/src`, you should change the config to:
valid_volumes:
- '/mnt/runner-cache/**'
# - data
# - /src/*.json
# If you want to allow any volume, please use the following configuration:
# valid_volumes:
# - '**'
# valid_volumes: []
# overrides the docker client host with the specified one.
# If it's empty, act_runner will find an available docker host automatically.
# If it's "-", act_runner will find an available docker host automatically, but the docker host won't be mounted to the job containers and service containers.
# If it's not empty or "-", the specified docker host will be used. An error will be returned if it doesn't work.
docker_host: ""
# Pull docker image(s) even if already present
force_pull: false
# Rebuild docker image(s) even if already present
force_rebuild: false
host:
# The parent directory of a job's working directory.
# If it's empty, $HOME/.cache/act/ will be used.
workdir_parent:
File diff suppressed because one or more lines are too long
+61 -63
View File
@@ -1,70 +1,68 @@
#generated using this command :
# docker run --entrypoint="" --rm -it gitea/act_runner:latest act_runner generate-config > config.yaml
apiVersion: v1
data:
config.yaml: "# Example configuration file, it's safe to copy this as the default
config file without any modification.\r\n\r\n# You don't have to copy this file
to your instance,\r\n# just run `./act_runner generate-config > config.yaml` to
generate a config file.\r\n\r\nlog:\r\n # The level of logging, can be trace,
debug, info, warn, error, fatal\r\n level: info\r\n\r\nrunner:\r\n # Where to
store the registration result.\r\n file: .runner\r\n # Execute how many tasks
concurrently at the same time.\r\n capacity: 1\r\n # Extra environment variables
to run jobs.\r\n envs:\r\n A_TEST_ENV_NAME_1: a_test_env_value_1\r\n A_TEST_ENV_NAME_2:
a_test_env_value_2\r\n # Extra environment variables to run jobs from a file.\r\n
\ # It will be ignored if it's empty or the file doesn't exist.\r\n env_file:
.env\r\n # The timeout for a job to be finished.\r\n # Please note that the
Gitea instance also has a timeout (3h by default) for the job.\r\n # So the job
could be stopped by the Gitea instance if it's timeout is shorter than this.\r\n
\ timeout: 3h\r\n # The timeout for the runner to wait for running jobs to finish
when shutting down.\r\n # Any running jobs that haven't finished after this timeout
will be cancelled.\r\n shutdown_timeout: 0s\r\n # Whether skip verifying the
TLS certificate of the Gitea instance.\r\n insecure: false\r\n # The timeout
for fetching the job from the Gitea instance.\r\n fetch_timeout: 5s\r\n # The
interval for fetching the job from the Gitea instance.\r\n fetch_interval: 2s\r\n
\ # The labels of a runner are used to determine which jobs the runner can run,
and how to run them.\r\n # Like: \"macos-arm64:host\" or \"ubuntu-latest:docker://gitea/runner-images:ubuntu-latest\"\r\n
config file without any modification.\n\n# You don't have to copy this file to
your instance,\n# just run `./act_runner generate-config > config.yaml` to generate
a config file.\n\nlog:\n # The level of logging, can be trace, debug, info, warn,
error, fatal\n level: info\n\nrunner:\n # Where to store the registration result.\n
\ file: .runner\n # Execute how many tasks concurrently at the same time.\n capacity:
1\n # Extra environment variables to run jobs.\n envs:\n A_TEST_ENV_NAME_1:
a_test_env_value_1\n A_TEST_ENV_NAME_2: a_test_env_value_2\n # Extra environment
variables to run jobs from a file.\n # It will be ignored if it's empty or the
file doesn't exist.\n env_file: .env\n # The timeout for a job to be finished.\n
\ # Please note that the Gitea instance also has a timeout (3h by default) for
the job.\n # So the job could be stopped by the Gitea instance if it's timeout
is shorter than this.\n timeout: 3h\n # The timeout for the runner to wait for
running jobs to finish when shutting down.\n # Any running jobs that haven't
finished after this timeout will be cancelled.\n shutdown_timeout: 0s\n # Whether
skip verifying the TLS certificate of the Gitea instance.\n insecure: false\n
\ # The timeout for fetching the job from the Gitea instance.\n fetch_timeout:
5s\n # The interval for fetching the job from the Gitea instance.\n fetch_interval:
2s\n # The labels of a runner are used to determine which jobs the runner can
run, and how to run them.\n # Like: \"macos-arm64:host\" or \"ubuntu-latest:docker://gitea/runner-images:ubuntu-latest\"\n
\ # Find more images provided by Gitea at https://gitea.com/gitea/runner-images
.\r\n # If it's empty when registering, it will ask for inputting labels.\r\n
\ # If it's empty when execute `daemon`, will use labels in `.runner` file.\r\n
\ labels:\r\n - \"ubuntu-latest:docker://gitea/runner-images:ubuntu-latest\"\r\n
\ - \"ubuntu-22.04:docker://gitea/runner-images:ubuntu-22.04\"\r\n - \"ubuntu-20.04:docker://gitea/runner-images:ubuntu-20.04\"\r\n\r\ncache:\r\n
\ # Enable cache server to use actions/cache.\r\n enabled: true\r\n # The directory
to store the cache data.\r\n # If it's empty, the cache data will be stored in
$HOME/.cache/actcache.\r\n dir: \"\"\r\n # The host of the cache server.\r\n
\ # It's not for the address to listen, but the address to connect from job containers.\r\n
\ # So 0.0.0.0 is a bad choice, leave it empty to detect automatically.\r\n host:
\"\"\r\n # The port of the cache server.\r\n # 0 means to use a random available
port.\r\n port: 0\r\n # The external cache server URL. Valid only when enable
is true.\r\n # If it's specified, act_runner will use this URL as the ACTIONS_CACHE_URL
rather than start a server by itself.\r\n # The URL should generally end with
\"/\".\r\n external_server: \"\"\r\n\r\ncontainer:\r\n # Specifies the network
to which the container will connect.\r\n # Could be host, bridge or the name
of a custom network.\r\n # If it's empty, act_runner will create a network automatically.\r\n
\ network: \"\"\r\n # Whether to use privileged mode or not when launching task
containers (privileged mode is required for Docker-in-Docker).\r\n privileged:
false\r\n # And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).\r\n
\ options:\r\n # The parent directory of a job's working directory.\r\n # NOTE:
There is no need to add the first '/' of the path as act_runner will add it automatically.
\r\n # If the path starts with '/', the '/' will be trimmed.\r\n # For example,
if the parent directory is /path/to/my/dir, workdir_parent should be path/to/my/dir\r\n
\ # If it's empty, /workspace will be used.\r\n workdir_parent:\r\n # Volumes
(including bind mounts) can be mounted to containers. Glob syntax is supported,
see https://github.com/gobwas/glob\r\n # You can specify multiple volumes. If
the sequence is empty, no volumes can be mounted.\r\n # For example, if you only
allow containers to mount the `data` volume and all the json files in `/src`,
you should change the config to:\r\n # valid_volumes:\r\n # - data\r\n #
\ - /src/*.json\r\n # If you want to allow any volume, please use the following
configuration:\r\n # valid_volumes:\r\n # - '**'\r\n valid_volumes: []\r\n
\ # overrides the docker client host with the specified one.\r\n # If it's empty,
act_runner will find an available docker host automatically.\r\n # If it's \"-\",
act_runner will find an available docker host automatically, but the docker host
won't be mounted to the job containers and service containers.\r\n # If it's
not empty or \"-\", the specified docker host will be used. An error will be returned
if it doesn't work.\r\n docker_host: \"\"\r\n # Pull docker image(s) even if
already present\r\n force_pull: true\r\n # Rebuild docker image(s) even if already
present\r\n force_rebuild: false\r\n\r\nhost:\r\n # The parent directory of
a job's working directory.\r\n # If it's empty, $HOME/.cache/act/ will be used.\r\n
\ workdir_parent:\r\n"
.\n # If it's empty when registering, it will ask for inputting labels.\n #
If it's empty when execute `daemon`, will use labels in `.runner` file.\n labels:\n
\ - \"ubuntu-latest:docker://gitea/runner-images:ubuntu-latest\"\n - \"custom-runner-debian-slim:docker://gitea.tryton.geeraert.eu/pi-ux-ce/custom-runner-debian-slim:latest\"\n
\ - \"ubuntu-22.04:docker://gitea/runner-images:ubuntu-22.04\"\n - \"ubuntu-20.04:docker://gitea/runner-images:ubuntu-20.04\"\n#
\ - \"ubuntu-latest:docker://debian:stable-slim\"\n - \"host-runner:host\"\n\ncache:\n
\ # Enable cache server to use actions/cache.\n enabled: true\n # The directory
to store the cache data.\n # If it's empty, the cache data will be stored in
$HOME/.cache/actcache.\n dir: \"\"\n # The host of the cache server.\n # It's
not for the address to listen, but the address to connect from job containers.\n
\ # So 0.0.0.0 is a bad choice, leave it empty to detect automatically.\n host:
\"\"\n # The port of the cache server.\n # 0 means to use a random available
port.\n port: 0\n # The external cache server URL. Valid only when enable is
true.\n # If it's specified, act_runner will use this URL as the ACTIONS_CACHE_URL
rather than start a server by itself.\n # The URL should generally end with \"/\".\n
\ external_server: \"\"\n\ncontainer:\n # Specifies the network to which the
container will connect.\n # Could be host, bridge or the name of a custom network.\n
\ # If it's empty, act_runner will create a network automatically.\n network:
\"\"\n # Whether to use privileged mode or not when launching task containers
(privileged mode is required for Docker-in-Docker).\n privileged: false\n #
And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).\n
\ options: '--volume /mnt/runner-cache:/toolcache'\n # The parent directory of
a job's working directory.\n # NOTE: There is no need to add the first '/' of
the path as act_runner will add it automatically. \n # If the path starts with
'/', the '/' will be trimmed.\n # For example, if the parent directory is /path/to/my/dir,
workdir_parent should be path/to/my/dir\n # If it's empty, /workspace will be
used.\n workdir_parent:\n # Volumes (including bind mounts) can be mounted to
containers. Glob syntax is supported, see https://github.com/gobwas/glob\n #
You can specify multiple volumes. If the sequence is empty, no volumes can be
mounted.\n # For example, if you only allow containers to mount the `data` volume
and all the json files in `/src`, you should change the config to:\n valid_volumes:\n
\ - '/mnt/runner-cache/**'\n # - data\n # - /src/*.json\n # If you want
to allow any volume, please use the following configuration:\n # valid_volumes:\n
\ # - '**'\n# valid_volumes: []\n # overrides the docker client host with
the specified one.\n # If it's empty, act_runner will find an available docker
host automatically.\n # If it's \"-\", act_runner will find an available docker
host automatically, but the docker host won't be mounted to the job containers
and service containers.\n # If it's not empty or \"-\", the specified docker
host will be used. An error will be returned if it doesn't work.\n docker_host:
\"\"\n # Pull docker image(s) even if already present\n force_pull: false\n
\ # Rebuild docker image(s) even if already present\n force_rebuild: false\n\nhost:\n
\ # The parent directory of a job's working directory.\n # If it's empty, $HOME/.cache/act/
will be used.\n workdir_parent:\n"
kind: ConfigMap
metadata:
creationTimestamp: null
-4157
View File
File diff suppressed because it is too large Load Diff
+16 -1
View File
@@ -37,8 +37,23 @@ spec:
resources:
requests:
storage: 100Mi
---
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: remote-buildkitd-data
namespace: gitea
spec:
storageClassName: nfs-storage-intelligent
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Mi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
+44
View File
@@ -0,0 +1,44 @@
container:
# ... other container options
valid_volumes:
- '/mnt/runner-cache/**'
options: '--volume /mnt/runner-cache:/toolcache' # Mount the host path to the job container's cache directory
Method 1: Using the act_runner configuration file (config.yaml)
You can define common volumes that should be mounted into all job containers in the runner's configuration file.
Identify your host path: Determine the absolute path on the host machine where the PVC is mounted. In Kubernetes/Docker environments, this might be a specific path managed by your storage provider, or a directory you manually bound a volume to. Let's assume it is /mnt/runner-cache.
Edit config.yaml: Add the valid_volumes configuration under the container section of your config.yaml file to explicitly allow mounting that specific path. You can also specify common mounts for all jobs.
yaml
container:
# ... other container options
valid_volumes:
- '/mnt/runner-cache/**'
options: '--volume /mnt/runner-cache:/toolcache' # Mount the host path to the job container's cache directory
Use code with caution.
The options line uses standard Docker command-line syntax to add a volume mount: -v <host_path>:<container_path>.
/toolcache is the hardcoded default directory within the job container where the actions/cache and setup-* actions store their data.
Restart the runner: For the changes to take effect, you must restart your act_runner container or service.
Method 2: Using the Workflow File (less ideal for central management)
If you prefer per-workflow control, you can define the volume mount directly in the Gitea Actions workflow YAML file. This requires you to ensure the runner has permission to mount this path (which the docker.sock mapping usually implies).
yaml
jobs:
build:
runs-on: ubuntu-latest
container:
image: your_job_image
volumes:
# Mount the host PVC path to the container cache path
- /mnt/runner-cache:/toolcache
steps:
# ... your steps using actions/cache
Use code with caution.
Ensure the Cache is Used in the Workflow