actions: add context example

This commit is contained in:
Earl Warren 2024-01-05 19:37:15 +01:00
parent c5cccca38d
commit 4768908489
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
8 changed files with 240 additions and 4 deletions

View file

@ -19,7 +19,7 @@ function run() {
echo "============================ RUN example-$example ==================="
bash -ex $EXAMPLE_DIR/run.sh || return 1
else
forgejo-test-helper.sh run_workflow actions/example-$example $url root example-$example setup-forgejo $token || return 1
forgejo-test-helper.sh run_workflow actions/example-$example $url root example-$example $example $token || return 1
fi
if test -f $EXAMPLE_DIR/teardown.sh ; then
@ -34,7 +34,7 @@ function examples_v1_20() {
function examples_v1_21() {
# 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 docker-action if if-fail cron'
echo 'echo push-cancel artifacts service checkout pull-request container expression local-action context docker-action if if-fail cron'
}
function examples_v1_22() {
@ -101,7 +101,7 @@ function main() {
for example in $examples ; do
echo "======================== BEGIN example-$example ==================="
if ! time run $example >& /tmp/run.out ; then
cat /tmp/run.out
sed -e 's/^/[RUN] /' < /tmp/run.out
echo "======================== FAIL example-$example ==================="
sleep 5 # hack for Forgejo v1.21 to workaround a bug by which the last lines of the output are moved to the next step
false