ci: docker_tag=ext (parse .env.example markdown table)
All checks were successful
build-and-push-ext / build_push (push) Successful in 56s
All checks were successful
build-and-push-ext / build_push (push) Successful in 56s
This commit is contained in:
parent
cf84f59353
commit
2f97110845
@ -37,7 +37,16 @@ jobs:
|
|||||||
if [ -f .env ]; then
|
if [ -f .env ]; then
|
||||||
. ./.env
|
. ./.env
|
||||||
elif [ -f .env.example ]; then
|
elif [ -f .env.example ]; then
|
||||||
. ./.env.example
|
# Parser .env.example même s'il est formaté en tableau Markdown
|
||||||
|
# On retire la bordure '|' éventuelle et on ne garde que les lignes KEY=VALUE
|
||||||
|
tmpenv=$(mktemp)
|
||||||
|
sed -E 's/^\|\s*//; s/\s*\|\s*$//' .env.example \
|
||||||
|
| awk 'NF>0' \
|
||||||
|
| grep -E '^[A-Z0-9_]+=.*' \
|
||||||
|
> "$tmpenv"
|
||||||
|
# Charger uniquement les variables
|
||||||
|
. "$tmpenv"
|
||||||
|
rm -f "$tmpenv"
|
||||||
fi
|
fi
|
||||||
set +a
|
set +a
|
||||||
echo "Environment NEXT_PUBLIC_* available (current step):" || true
|
echo "Environment NEXT_PUBLIC_* available (current step):" || true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user