actions: post-7-0-schedule: create /srv/example/post-7-0-schedule/contexts first

A loop is waiting for /srv/example/post-7-0-schedule-volume/DONE to exist before
declaring the workflow is successfully run. But it is not really until
/srv/example/post-7-0-schedule/contexts is created with the event content and they
will race.

Fixes: https://code.forgejo.org/forgejo/end-to-end/issues/181

Exactly the same as 57fdd1cd49 but for
post-7-0-schedule instead of cron
This commit is contained in:
Earl Warren 2024-06-01 09:36:45 +02:00
parent 2b8c2826c5
commit 9e60ae4449
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -10,14 +10,14 @@ jobs:
options: "--volume /srv/example:/srv/example" options: "--volume /srv/example:/srv/example"
steps: steps:
- run: |
echo "TEST_SCHEDULE_RUNSON=${{ vars.TEST_SCHEDULE_RUNSON }}"
touch /srv/example/post-7-0-schedule-volume/DONE
- name: save context - name: save context
run: | run: |
d=/srv/example/post-7-0-schedule/contexts/$GITHUB_EVENT_NAME d=/srv/example/post-7-0-schedule/contexts/$GITHUB_EVENT_NAME
mkdir -p $d mkdir -p $d
cat > $d/github <<'EOF' cat > $d/github <<'EOF'
${{ toJSON(github) }} ${{ toJSON(github) }}
EOF EOF
- run: |
echo "TEST_SCHEDULE_RUNSON=${{ vars.TEST_SCHEDULE_RUNSON }}"
touch /srv/example/post-7-0-schedule-volume/DONE