end-to-end/actions/example-cron/.forgejo/workflows/test.yml
Earl Warren 57fdd1cd49
actions: cron: create /srv/example/cron/contexts first
A loop is waiting for /srv/example/cron-volume/DONE to exist before
declaring the workflow is successfully run. But it is not really until
/srv/example/cron/contexts is created with the event content and they
will race.

Fixes: https://code.forgejo.org/forgejo/end-to-end/issues/181
2024-05-21 08:16:39 +02:00

22 lines
468 B
YAML

on:
schedule:
- cron: '* * * * *'
jobs:
test:
runs-on: docker
container:
image: code.forgejo.org/oci/debian:bookworm
options: "--volume /srv/example:/srv/example"
steps:
- name: save context
run: |
d=/srv/example/cron/contexts/$GITHUB_EVENT_NAME
mkdir -p $d
cat > $d/github <<'EOF'
${{ toJSON(github) }}
EOF
- run: |
touch /srv/example/cron-volume/DONE