mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-04-09 09:03:40 +00:00
fix(ci): use random heredoc delimiter in release workflow
$GITHUB_OUTPUT heredoc blocks used literal 'EOF' as delimiter, which breaks parsing if generated release notes contain 'EOF' on its own line. Replace static 'EOF' with openssl rand -hex 16 random delimiter in both the version-warning and release-notes output blocks. Impact: Release workflow no longer fails when commit message bodies contain 'EOF'.
This commit is contained in:
parent
070905e880
commit
8bd3ef85c0
1 changed files with 8 additions and 4 deletions
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
|
|
@ -181,8 +181,10 @@ jobs:
|
||||||
echo "Commits analyzed: Breaking=$BREAKING, Features=$FEAT, Fixes=$FIX"
|
echo "Commits analyzed: Breaking=$BREAKING, Features=$FEAT, Fixes=$FIX"
|
||||||
|
|
||||||
# Set output for later steps (using heredoc for multi-line)
|
# Set output for later steps (using heredoc for multi-line)
|
||||||
|
# Use random delimiter to avoid collision if content contains 'EOF'
|
||||||
|
WARN_DELIM=$(openssl rand -hex 16)
|
||||||
{
|
{
|
||||||
echo "warning<<EOF"
|
echo "warning<<${WARN_DELIM}"
|
||||||
echo "$WARNING"
|
echo "$WARNING"
|
||||||
echo ""
|
echo ""
|
||||||
echo "$SUGGESTION"
|
echo "$SUGGESTION"
|
||||||
|
|
@ -195,7 +197,7 @@ jobs:
|
||||||
echo "3. Push the corrected tag: \`git push origin v<suggested-version>\`"
|
echo "3. Push the corrected tag: \`git push origin v<suggested-version>\`"
|
||||||
echo ""
|
echo ""
|
||||||
echo "**This tag will be automatically deleted in the next step.**"
|
echo "**This tag will be automatically deleted in the next step.**"
|
||||||
echo "EOF"
|
echo "${WARN_DELIM}"
|
||||||
} >> $GITHUB_OUTPUT
|
} >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "✓ Version bump looks appropriate for the changes"
|
echo "✓ Version bump looks appropriate for the changes"
|
||||||
|
|
@ -242,10 +244,12 @@ jobs:
|
||||||
echo "title=$TITLE" >> $GITHUB_OUTPUT
|
echo "title=$TITLE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Output for GitHub Actions
|
# Output for GitHub Actions
|
||||||
|
# Use random delimiter to avoid collision if release notes contain 'EOF'
|
||||||
|
NOTES_DELIM=$(openssl rand -hex 16)
|
||||||
{
|
{
|
||||||
echo 'notes<<EOF'
|
echo "notes<<${NOTES_DELIM}"
|
||||||
cat release-notes.md
|
cat release-notes.md
|
||||||
echo EOF
|
echo "${NOTES_DELIM}"
|
||||||
} >> $GITHUB_OUTPUT
|
} >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue