actions: update the documentation with context examples

This commit is contained in:
Earl Warren 2024-01-07 23:49:28 +01:00
parent 79cc059d98
commit 921ed6f481
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
5 changed files with 57 additions and 9 deletions

View file

@ -1,6 +1,7 @@
#!/bin/bash
set -e
set -o pipefail
SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@ -41,6 +42,15 @@ function examples_v1_22() {
examples_v1_21
}
function save_contexts() {
local example="$1"
if test -d /srv/example/$example/contexts; then
mkdir -p /srv/contexts
rsync -av /srv/example/$example/contexts/ /srv/contexts/$example/
fi
}
function cleanup_example_volume() {
if ! test -d /srv/example ; then
mkdir -p /srv/example
@ -109,6 +119,7 @@ function main() {
false
fi
echo "======================== END example-$example ==================="
save_contexts $example
cleanup_example_volume
done
}