Merge pull request 'actions: context examples supporting the documentation' (#56) from earl-warren/end-to-end:wip-context into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/56 Reviewed-by: dachary <dachary@noreply.code.forgejo.org>
This commit is contained in:
commit
69747630a9
19 changed files with 272 additions and 56 deletions
|
@ -3,6 +3,6 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: alpine:3.18
|
image: alpine:3.19
|
||||||
steps:
|
steps:
|
||||||
- run: grep Alpine /etc/os-release
|
- run: grep Alpine /etc/os-release
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
ONE
|
|
188
actions/example-context/.forgejo/workflows/test.yml
Normal file
188
actions/example-context/.forgejo/workflows/test.yml
Normal file
|
@ -0,0 +1,188 @@
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: code.forgejo.org/oci/node:20-bookworm
|
||||||
|
options: "--volume /srv/example:/srv/example"
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: env.CI
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$CI" = true
|
||||||
|
test "$CI" = "${{ env.CI }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_ACTION
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
echo "$GITHUB_ACTION" | grep -E '^[0-9]+$'
|
||||||
|
test "$GITHUB_ACTION" = "${{ env.GITHUB_ACTION }}"
|
||||||
|
|
||||||
|
# See also actions/example-local-action/.forgejo/local-action/action.yml
|
||||||
|
- name: env.GITHUB_ACTION_PATH
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test -z "$GITHUB_ACTION_PATH"
|
||||||
|
test "$GITHUB_ACTION_PATH" = "${{ env.GITHUB_ACTION_PATH }}"
|
||||||
|
|
||||||
|
- name: when running an action
|
||||||
|
if: ${{ env.GITHUB_ACTIONS }}
|
||||||
|
uses: SELF@main
|
||||||
|
with:
|
||||||
|
input-one: "otherone"
|
||||||
|
|
||||||
|
- name: env.GITHUB_ACTION_REPOSITORY
|
||||||
|
run: test -f /srv/example/example-context/GITHUB_ACTION_REPOSITORY
|
||||||
|
|
||||||
|
- name: env.GITHUB_ACTION_PATH
|
||||||
|
run: test -f /srv/example/example-context/GITHUB_ACTION_PATH
|
||||||
|
|
||||||
|
- name: env.GITHUB_ACTIONS
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$GITHUB_ACTIONS" = true
|
||||||
|
test "$GITHUB_ACTIONS" = "${{ env.GITHUB_ACTIONS }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_ACTOR
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$GITHUB_ACTOR"
|
||||||
|
test "$GITHUB_ACTOR" = "${{ env.GITHUB_ACTOR }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_API_URL
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
[[ "$GITHUB_API_URL" =~ /api/v1$ ]]
|
||||||
|
test "$GITHUB_API_URL" = "${{ env.GITHUB_API_URL }}"
|
||||||
|
|
||||||
|
# See also actions/example-pull-request/.forgejo/workflows/test.yml
|
||||||
|
- name: env.GITHUB_BASE_REF
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test -z "$GITHUB_BASE_REF"
|
||||||
|
test "$GITHUB_BASE_REF" = "${{ env.GITHUB_BASE_REF }}"
|
||||||
|
|
||||||
|
# See also actions/example-pull-request/.forgejo/workflows/test.yml
|
||||||
|
- name: env.GITHUB_HEAD_REF
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test -z "$GITHUB_HEAD_REF"
|
||||||
|
test "$GITHUB_HEAD_REF" = "${{ env.GITHUB_HEAD_REF }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_ENV
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test -f "$GITHUB_ENV"
|
||||||
|
test "$GITHUB_ENV" = "${{ env.GITHUB_ENV }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_EVENT_NAME
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$GITHUB_EVENT_NAME" = push
|
||||||
|
test "$GITHUB_EVENT_NAME" = "${{ env.GITHUB_EVENT_NAME }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_JOB
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$GITHUB_JOB" = test
|
||||||
|
test "$GITHUB_JOB" = "${{ env.GITHUB_JOB }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_OUTPUT
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test -f "$GITHUB_OUTPUT"
|
||||||
|
test "$GITHUB_OUTPUT" = "${{ env.GITHUB_OUTPUT }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_PATH
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test -f "$GITHUB_PATH"
|
||||||
|
test "$GITHUB_PATH" = "${{ env.GITHUB_PATH }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_REF
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
[[ "$GITHUB_REF" =~ ^refs/ ]]
|
||||||
|
test "$GITHUB_REF" = "${{ env.GITHUB_REF }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_REF_NAME
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
! [[ "$GITHUB_REF_NAME" =~ ^refs/ ]]
|
||||||
|
test "$GITHUB_REF_NAME" = "${{ env.GITHUB_REF_NAME }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_REPOSITORY
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$GITHUB_REPOSITORY" = root/example-context
|
||||||
|
test "$GITHUB_REPOSITORY" = "${{ env.GITHUB_REPOSITORY }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_REPOSITORY_OWNER
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$GITHUB_REPOSITORY_OWNER" = root
|
||||||
|
test "$GITHUB_REPOSITORY_OWNER" = "${{ env.GITHUB_REPOSITORY_OWNER }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_RUN_NUMBER
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
echo "$GITHUB_RUN_NUMBER" | grep -E '^[0-9]+$'
|
||||||
|
test "$GITHUB_RUN_NUMBER" = "${{ env.GITHUB_RUN_NUMBER }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_SERVER_URL
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
[[ "$GITHUB_SERVER_URL" =~ ^http ]]
|
||||||
|
test "$GITHUB_SERVER_URL" = "${{ env.GITHUB_SERVER_URL }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_SHA
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$GITHUB_SHA"
|
||||||
|
test "$GITHUB_SHA" = "${{ env.GITHUB_SHA }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_STEP_SUMMARY
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test -f "$GITHUB_STEP_SUMMARY"
|
||||||
|
test "$GITHUB_STEP_SUMMARY" = "${{ env.GITHUB_STEP_SUMMARY }}"
|
||||||
|
|
||||||
|
# See also actions/example-pull-request/.forgejo/workflows/test.yml
|
||||||
|
- name: env.GITHUB_TOKEN
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$GITHUB_TOKEN"
|
||||||
|
test "$GITHUB_TOKEN" = "${{ env.GITHUB_TOKEN }}"
|
||||||
|
|
||||||
|
- name: env.GITHUB_WORKSPACE
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test -d "$GITHUB_WORKSPACE"
|
||||||
|
test "$GITHUB_WORKSPACE" = "${{ env.GITHUB_WORKSPACE }}"
|
||||||
|
|
||||||
|
- name: RUNNER_ARCH
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$RUNNER_ARCH" = X64
|
||||||
|
|
||||||
|
- name: RUNNER_OS
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$RUNNER_OS" = Linux
|
||||||
|
|
||||||
|
# runner 3.3.0 $RUNNER_TOOL_CACHE is not an existing directory
|
||||||
|
# - name: RUNNER_TOOL_CACHE
|
||||||
|
# run: |
|
||||||
|
# set -x
|
||||||
|
# test -d "$RUNNER_TOOL_CACHE"
|
||||||
|
|
||||||
|
- name: RUNNER_TEMP
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test -d "$RUNNER_TEMP"
|
21
actions/example-context/action-for-context/action.yml
Normal file
21
actions/example-context/action-for-context/action.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
inputs:
|
||||||
|
input-one:
|
||||||
|
default: 'one'
|
||||||
|
description: 'description one'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: GITHUB_ACTION_REPOSITORY
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$GITHUB_ACTION_REPOSITORY" = root/action-for-context
|
||||||
|
test "$GITHUB_ACTION_REPOSITORY" = "${{ env.GITHUB_ACTION_REPOSITORY }}"
|
||||||
|
touch /srv/example/example-context/GITHUB_ACTION_REPOSITORY
|
||||||
|
|
||||||
|
- name: GITHUB_ACTION_PATH
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
[[ "$GITHUB_ACTION_PATH" =~ action-for-context@main$ ]]
|
||||||
|
touch /srv/example/example-context/GITHUB_ACTION_PATH
|
1
actions/example-context/run.sh
Normal file
1
actions/example-context/run.sh
Normal file
|
@ -0,0 +1 @@
|
||||||
|
forgejo-test-helper.sh run_workflow actions/example-$example $url root example-$example action-for-context $token
|
3
actions/example-context/setup.sh
Normal file
3
actions/example-context/setup.sh
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
mkdir -p /srv/example/example-context
|
||||||
|
|
||||||
|
forgejo-test-helper.sh push actions/example-$example/action-for-context $url root action-for-context
|
|
@ -7,8 +7,8 @@ jobs:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: code.forgejo.org/oci/debian:bookworm
|
image: code.forgejo.org/oci/debian:bookworm
|
||||||
options: "--volume /srv/example-cron-volume:/srv/example-cron-volume"
|
options: "--volume /srv/example:/srv/example"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- run: |
|
||||||
touch /srv/example-cron-volume/DONE
|
touch /srv/example/cron-volume/DONE
|
||||||
|
|
|
@ -16,7 +16,7 @@ forgejo-curl.sh api_json --data '{"new_branch_name":"zzzz"}' $api/repos/root/exa
|
||||||
verify_ref
|
verify_ref
|
||||||
|
|
||||||
# cron runs once per minute, give it three minutes max before declaring failure
|
# cron runs once per minute, give it three minutes max before declaring failure
|
||||||
if ! RETRY_DELAYS="30 30 30 30 30 30" forgejo.sh retry test -f /srv/example-cron-volume/DONE ; then
|
if ! RETRY_DELAYS="30 30 30 30 30 30" forgejo.sh retry test -f /srv/example/cron-volume/DONE ; then
|
||||||
cat $FORGEJO_RUNNER_LOGS
|
cat $FORGEJO_RUNNER_LOGS
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
|
|
||||||
log:
|
|
||||||
level: info
|
|
||||||
|
|
||||||
runner:
|
|
||||||
file: .runner
|
|
||||||
capacity: 1
|
|
||||||
env_file: .env
|
|
||||||
timeout: 3h
|
|
||||||
insecure: false
|
|
||||||
fetch_timeout: 5s
|
|
||||||
fetch_interval: 2s
|
|
||||||
labels: ["docker:docker://code.forgejo.org/oci/node:16-bullseye"]
|
|
||||||
|
|
||||||
cache:
|
|
||||||
enabled: false
|
|
||||||
dir: ""
|
|
||||||
host: ""
|
|
||||||
port: 0
|
|
||||||
|
|
||||||
container:
|
|
||||||
network: ""
|
|
||||||
privileged: false
|
|
||||||
options:
|
|
||||||
workdir_parent:
|
|
||||||
valid_volumes: ["/srv/example-cron-volume"]
|
|
||||||
docker_host: ""
|
|
||||||
|
|
||||||
host:
|
|
||||||
workdir_parent:
|
|
|
@ -1,3 +1 @@
|
||||||
rm -fr /srv/example-cron-volume
|
mkdir -p /srv/example/cron-volume
|
||||||
mkdir -p /srv/example-cron-volume
|
|
||||||
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
forgejo-runner.sh reload
|
|
|
@ -13,4 +13,10 @@ outputs:
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
- name: GITHUB_ACTION_PATH
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$(basename $GITHUB_ACTION_PATH)" = local-action
|
||||||
|
test "$GITHUB_ACTION_PATH" = "${{ env.GITHUB_ACTION_PATH }}"
|
||||||
|
|
||||||
- run: echo key=${{ inputs.input-two-required }} >> $GITHUB_OUTPUT
|
- run: echo key=${{ inputs.input-two-required }} >> $GITHUB_OUTPUT
|
||||||
|
|
|
@ -10,7 +10,7 @@ jobs:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: code.forgejo.org/oci/node:20-bookworm
|
image: code.forgejo.org/oci/node:20-bookworm
|
||||||
options: "--volume /srv/example-pull-request:/srv/example-pull-request"
|
options: "--volume /srv/example:/srv/example"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: setup
|
- name: setup
|
||||||
|
@ -33,6 +33,24 @@ jobs:
|
||||||
echo value=true >> $GITHUB_OUTPUT
|
echo value=true >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# See also actions/example-context/.forgejo/workflows/test.yml
|
||||||
|
- name: env.GITHUB_BASE_REF
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
test "$GITHUB_BASE_REF" = main
|
||||||
|
test "$GITHUB_BASE_REF" = "${{ env.GITHUB_BASE_REF }}"
|
||||||
|
|
||||||
|
# See also actions/example-context/.forgejo/workflows/test.yml
|
||||||
|
- name: env.GITHUB_HEAD_REF
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
if ${{ steps.forked.outputs.value }} ; then
|
||||||
|
test "$GITHUB_HEAD_REF" = main
|
||||||
|
else
|
||||||
|
test "$GITHUB_HEAD_REF" = other
|
||||||
|
fi
|
||||||
|
test "$GITHUB_HEAD_REF" = "${{ env.GITHUB_HEAD_REF }}"
|
||||||
|
|
||||||
- name: secrets
|
- name: secrets
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -115,7 +133,7 @@ jobs:
|
||||||
|
|
||||||
- name: save event
|
- name: save event
|
||||||
run: |
|
run: |
|
||||||
d=/srv/example-pull-request/${{ github.event.pull_request.head.repo.owner.username }}/$GITHUB_EVENT_NAME/${{ github.event.action }}
|
d=/srv/example/pull-request/${{ github.event.pull_request.head.repo.owner.username }}/$GITHUB_EVENT_NAME/${{ github.event.action }}
|
||||||
mkdir -p $d
|
mkdir -p $d
|
||||||
cat > $d/event <<'EOF'
|
cat > $d/event <<'EOF'
|
||||||
${{ toJSON(github.event) }}
|
${{ toJSON(github.event) }}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
api=$url/api/v1
|
api=$url/api/v1
|
||||||
export d=/srv/example-pull-request
|
export d=/srv/example/pull-request
|
||||||
|
|
||||||
PROOF='some proof'
|
PROOF='some proof'
|
||||||
|
|
||||||
function setup() {
|
function setup() {
|
||||||
|
mkdir -p $d
|
||||||
|
|
||||||
forgejo-test-helper.sh push_workflow actions/example-$example $url root example-$example setup-forgejo $token
|
forgejo-test-helper.sh push_workflow actions/example-$example $url root example-$example setup-forgejo $token
|
||||||
|
|
||||||
forgejo-curl.sh api_json --data-raw '{"username":"fork-org"}' $api/orgs
|
forgejo-curl.sh api_json --data-raw '{"username":"fork-org"}' $api/orgs
|
||||||
|
|
|
@ -1,8 +1,2 @@
|
||||||
if test $(id -u) != 0 ; then
|
mkdir -p /srv/example/pull-request
|
||||||
SUDO=sudo
|
|
||||||
fi
|
|
||||||
|
|
||||||
$SUDO rm -fr /srv/example-pull-request/{root,fork-org}
|
|
||||||
rm -fr /srv/example-pull-request
|
|
||||||
mkdir -p /srv/example-pull-request
|
|
||||||
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
forgejo-runner.sh reload
|
|
|
@ -10,7 +10,7 @@ runner:
|
||||||
insecure: false
|
insecure: false
|
||||||
fetch_timeout: 5s
|
fetch_timeout: 5s
|
||||||
fetch_interval: 2s
|
fetch_interval: 2s
|
||||||
labels: ["docker:docker://code.forgejo.org/oci/node:16-bullseye"]
|
labels: ["docker:docker://code.forgejo.org/oci/node:20-bookworm"]
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -2,11 +2,13 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
function run() {
|
function run() {
|
||||||
local example=$1
|
local example=$1
|
||||||
|
|
||||||
export example
|
export example
|
||||||
export EXAMPLE_DIR=$(pwd)/actions/example-$example
|
export EXAMPLE_DIR=$SELF_DIR/example-$example
|
||||||
|
|
||||||
if test -f $EXAMPLE_DIR/setup.sh ; then
|
if test -f $EXAMPLE_DIR/setup.sh ; then
|
||||||
echo "============================ SETUP example-$example ==================="
|
echo "============================ SETUP example-$example ==================="
|
||||||
|
@ -17,7 +19,7 @@ function run() {
|
||||||
echo "============================ RUN example-$example ==================="
|
echo "============================ RUN example-$example ==================="
|
||||||
bash -ex $EXAMPLE_DIR/run.sh || return 1
|
bash -ex $EXAMPLE_DIR/run.sh || return 1
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
if test -f $EXAMPLE_DIR/teardown.sh ; then
|
if test -f $EXAMPLE_DIR/teardown.sh ; then
|
||||||
|
@ -32,16 +34,31 @@ 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 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() {
|
function examples_v1_22() {
|
||||||
examples_v1_21
|
examples_v1_21
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cleanup_example_volume() {
|
||||||
|
if ! test -d /srv/example ; then
|
||||||
|
mkdir -p /srv/example
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $(id -u) != 0 ; then
|
||||||
|
SUDO=sudo
|
||||||
|
fi
|
||||||
|
|
||||||
|
$SUDO rm -fr /srv/example/*
|
||||||
|
}
|
||||||
|
|
||||||
function setup() {
|
function setup() {
|
||||||
local binary=$1
|
local binary=$1
|
||||||
forgejo-binary.sh setup root admin1234 $binary
|
forgejo-binary.sh setup root admin1234 $binary
|
||||||
|
cleanup_example_volume
|
||||||
|
export FORGEJO_RUNNER_CONFIG=$SELF_DIR/runner-config.yaml
|
||||||
forgejo-runner.sh setup
|
forgejo-runner.sh setup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,12 +101,13 @@ function main() {
|
||||||
for example in $examples ; do
|
for example in $examples ; do
|
||||||
echo "======================== BEGIN example-$example ==================="
|
echo "======================== BEGIN example-$example ==================="
|
||||||
if ! time run $example >& /tmp/run.out ; then
|
if ! time run $example >& /tmp/run.out ; then
|
||||||
cat /tmp/run.out
|
sed -e 's/^/[RUN] /' < /tmp/run.out
|
||||||
echo "======================== FAIL example-$example ==================="
|
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
|
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
|
false
|
||||||
fi
|
fi
|
||||||
echo "======================== END example-$example ==================="
|
echo "======================== END example-$example ==================="
|
||||||
|
cleanup_example_volume
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ container:
|
||||||
privileged: false
|
privileged: false
|
||||||
options:
|
options:
|
||||||
workdir_parent:
|
workdir_parent:
|
||||||
valid_volumes: ["/srv/example-pull-request"]
|
valid_volumes: ["/srv/example"]
|
||||||
docker_host: ""
|
docker_host: ""
|
||||||
|
|
||||||
host:
|
host:
|
Loading…
Add table
Reference in a new issue