always allow workflows to mount /srv/example
because it is generally useful to store informations about how the workflow ran
This commit is contained in:
parent
11bf9b45c7
commit
b63144cb0d
11 changed files with 30 additions and 50 deletions
|
@ -7,8 +7,8 @@ jobs:
|
|||
runs-on: docker
|
||||
container:
|
||||
image: code.forgejo.org/oci/debian:bookworm
|
||||
options: "--volume /srv/example-cron-volume:/srv/example-cron-volume"
|
||||
options: "--volume /srv/example:/srv/example"
|
||||
|
||||
steps:
|
||||
- run: |
|
||||
touch /srv/example-cron-volume/DONE
|
||||
touch /srv/example/cron-volume/DONE
|
||||
|
|
|
@ -16,7 +16,7 @@ forgejo-curl.sh api_json --data '{"new_branch_name":"zzzz"}' $api/repos/root/exa
|
|||
verify_ref
|
||||
|
||||
# cron runs once per minute, give it three minutes max before declaring failure
|
||||
if ! RETRY_DELAYS="30 30 30 30 30 30" forgejo.sh retry test -f /srv/example-cron-volume/DONE ; then
|
||||
if ! RETRY_DELAYS="30 30 30 30 30 30" forgejo.sh retry test -f /srv/example/cron-volume/DONE ; then
|
||||
cat $FORGEJO_RUNNER_LOGS
|
||||
false
|
||||
fi
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
|
||||
log:
|
||||
level: info
|
||||
|
||||
runner:
|
||||
file: .runner
|
||||
capacity: 1
|
||||
env_file: .env
|
||||
timeout: 3h
|
||||
insecure: false
|
||||
fetch_timeout: 5s
|
||||
fetch_interval: 2s
|
||||
labels: ["docker:docker://code.forgejo.org/oci/node:16-bullseye"]
|
||||
|
||||
cache:
|
||||
enabled: false
|
||||
dir: ""
|
||||
host: ""
|
||||
port: 0
|
||||
|
||||
container:
|
||||
network: ""
|
||||
privileged: false
|
||||
options:
|
||||
workdir_parent:
|
||||
valid_volumes: ["/srv/example-cron-volume"]
|
||||
docker_host: ""
|
||||
|
||||
host:
|
||||
workdir_parent:
|
|
@ -1,3 +1 @@
|
|||
rm -fr /srv/example-cron-volume
|
||||
mkdir -p /srv/example-cron-volume
|
||||
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload
|
||||
mkdir -p /srv/example/cron-volume
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
forgejo-runner.sh reload
|
Loading…
Add table
Reference in a new issue