Merge pull request 'actions/example-cron: verify the type of the event' (#70) from earl-warren/end-to-end:wip-cron into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/70 Reviewed-by: dachary <dachary@noreply.code.forgejo.org>
This commit is contained in:
commit
d825dac67e
2 changed files with 13 additions and 0 deletions
|
@ -12,3 +12,11 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- run: |
|
||||||
touch /srv/example/cron-volume/DONE
|
touch /srv/example/cron-volume/DONE
|
||||||
|
|
||||||
|
- name: save context
|
||||||
|
run: |
|
||||||
|
d=/srv/example/cron/contexts/$GITHUB_EVENT_NAME
|
||||||
|
mkdir -p $d
|
||||||
|
cat > $d/github <<'EOF'
|
||||||
|
${{ toJSON(github) }}
|
||||||
|
EOF
|
||||||
|
|
|
@ -20,3 +20,8 @@ if ! RETRY_DELAYS="30 30 30 30 30 30" forgejo.sh retry test -f /srv/example/cron
|
||||||
cat $FORGEJO_RUNNER_LOGS
|
cat $FORGEJO_RUNNER_LOGS
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
c=/srv/example/cron/contexts/schedule/github
|
||||||
|
cat $c
|
||||||
|
test "schedule" = "$(jq -r .event_name < $c)"
|
||||||
|
test "schedule" = "$(jq -r .event.action < $c)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue