You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/create-docs-toolbox-image.yml
+41Lines changed: 41 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,43 @@ jobs:
55
55
56
56
echo "Using tags: ${TAGS}"
57
57
58
+
- name: Extract description from README
59
+
id: readme
60
+
shell: bash
61
+
run: |
62
+
set -euo pipefail
63
+
64
+
if [[ ! -f README.md ]]; then
65
+
echo "description=A lightweight Docker image for running Docs-as-Code pipelines in a fully reproducible environment — locally and in CI." >> "$GITHUB_OUTPUT"
66
+
exit 0
67
+
fi
68
+
69
+
DESC="$(
70
+
awk '
71
+
/^# / { found_title=1; next }
72
+
found_title && NF { print; exit }
73
+
' README.md
74
+
)"
75
+
76
+
if [[ -z "${DESC}" ]]; then
77
+
DESC="A lightweight Docker image for running Docs-as-Code pipelines in a fully reproducible environment — locally and in CI."
78
+
fi
79
+
80
+
# Markdown-Links grob entschärfen: [text](url) -> text
81
+
DESC="$(printf '%s' "$DESC" | sed -E 's/\[([^\]]+)\]\([^)]+\)/\1/g')"
82
+
83
+
# Quotes und Backslashes entschärfen
84
+
DESC="$(printf '%s' "$DESC" | sed 's/\\/\\\\/g; s/"/\\"/g')"
org.opencontainers.image.description="A lightweight Docker image for running Docs-as-Code pipelines in a fully reproducible environment — locally and in CI." \
0 commit comments