Merge pull request 'actions: add example-push' (#64) from earl-warren/end-to-end:wip-event into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/64 Reviewed-by: dachary <dachary@noreply.code.forgejo.org>
This commit is contained in:
commit
d3eb40ac8b
2 changed files with 22 additions and 1 deletions
21
actions/example-push/.forgejo/workflows/test.yml
Normal file
21
actions/example-push/.forgejo/workflows/test.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'mai*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: code.forgejo.org/oci/node:20-bookworm
|
||||||
|
volumes:
|
||||||
|
- /srv/example:/srv/example
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: save event
|
||||||
|
run: |
|
||||||
|
d=/srv/example/pull-request/contexts/$GITHUB_EVENT_NAME
|
||||||
|
mkdir -p $d
|
||||||
|
cat > $d/github <<'EOF'
|
||||||
|
${{ toJSON(github) }}
|
||||||
|
EOF
|
|
@ -35,7 +35,7 @@ function examples_v1_20() {
|
||||||
|
|
||||||
function examples_v1_21() {
|
function examples_v1_21() {
|
||||||
# keep "cron" last otherwise it will linger and pollute the following runs
|
# keep "cron" last otherwise it will linger and pollute the following runs
|
||||||
echo 'echo push-cancel artifacts service checkout pull-request container expression local-action context docker-action if if-fail cron'
|
echo 'echo push push-cancel artifacts service checkout pull-request container expression local-action context docker-action if if-fail cron'
|
||||||
}
|
}
|
||||||
|
|
||||||
function examples_v1_22() {
|
function examples_v1_22() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue