deploy-workflow: create docker compose file
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7s

This commit is contained in:
2026-07-04 01:27:59 +03:00
parent d0a4990780
commit c159c0177f
2 changed files with 18 additions and 7 deletions
@@ -15,12 +15,23 @@ runs:
using: 'composite'
steps:
- id: escape
shell: bash
shell: python
env:
RAW_MESSAGE: ${{ inputs.message }}
ESCAPED_MESSAGE: ${{ github.output }}
run: |
ESCAPED_MESSAGE=$(echo "$RAW_MESSAGE" | sed "s|-|-\\\\-|g" | sed "s|\.|\ \ \ \ .|g" | sed "s|!|\\\\!|g")
import os
raw_text = os.environ.get("RAW_MESSAGE", "")
output_file = os.environ.get("ESCAPED_MESSAGE")
escape_chars = ["-", ".", "!"]
echo "result<<EOF" >> $GITHUB_OUTPUT
echo "$ESCAPED_MESSAGE" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
escaped_text = raw_text
for char in escape_chars:
escaped_text = escaped_text.replace(char, f"\\{char}")
with open(output_file, "a", encoding="utf-8") as f:
f.write("result<<EOF\n")
f.write(f"{escaped_text}\n")
f.write("EOF\n")