mirror of
https://github.com/Sea-Haven-Industries/afterhours-shift-manager.git
synced 2026-10-02 14:23:13 +00:00
Fix printf flag parsing in version bump workflow (#28)
This commit is contained in:
parent
f92f2ed72e
commit
7116458efb
1 changed files with 17 additions and 3 deletions
20
.github/workflows/deploy-notify.yml
vendored
20
.github/workflows/deploy-notify.yml
vendored
|
|
@ -99,7 +99,14 @@ jobs:
|
||||||
CANVAS_BULLETS: ${{ steps.changes.outputs.canvas_bullets }}
|
CANVAS_BULLETS: ${{ steps.changes.outputs.canvas_bullets }}
|
||||||
run: |
|
run: |
|
||||||
TODAY=$(TZ=America/New_York date +%Y-%m-%d)
|
TODAY=$(TZ=America/New_York date +%Y-%m-%d)
|
||||||
MARKDOWN=$(printf "---\n\n## %s — %s\n\n%s" "$VERSION" "$TODAY" "$CANVAS_BULLETS")
|
read -r -d '' MARKDOWN <<ENDMD || true
|
||||||
|
---
|
||||||
|
|
||||||
|
## ${VERSION} — ${TODAY}
|
||||||
|
|
||||||
|
${CANVAS_BULLETS}
|
||||||
|
ENDMD
|
||||||
|
MARKDOWN=$(echo "$MARKDOWN" | sed 's/^ //')
|
||||||
|
|
||||||
RESPONSE=$(curl -s -X POST https://slack.com/api/canvases.edit \
|
RESPONSE=$(curl -s -X POST https://slack.com/api/canvases.edit \
|
||||||
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
|
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
|
||||||
|
|
@ -135,8 +142,15 @@ jobs:
|
||||||
SLACK_BULLETS: ${{ steps.changes.outputs.slack_bullets }}
|
SLACK_BULLETS: ${{ steps.changes.outputs.slack_bullets }}
|
||||||
run: |
|
run: |
|
||||||
CANVAS_URL="https://app.slack.com/docs/F0B13V3EBUN"
|
CANVAS_URL="https://app.slack.com/docs/F0B13V3EBUN"
|
||||||
TEXT=$(printf "*After-Hours Scheduler has been updated to %s*\n\nHere's a brief summary of what changed:\n%s\n\n<%s|Click here to read the full changelog>" \
|
read -r -d '' TEXT <<ENDTXT || true
|
||||||
"$VERSION" "$SLACK_BULLETS" "$CANVAS_URL")
|
*After-Hours Scheduler has been updated to ${VERSION}*
|
||||||
|
|
||||||
|
Here's a brief summary of what changed:
|
||||||
|
${SLACK_BULLETS}
|
||||||
|
|
||||||
|
<${CANVAS_URL}|Click here to read the full changelog>
|
||||||
|
ENDTXT
|
||||||
|
TEXT=$(echo "$TEXT" | sed 's/^ //')
|
||||||
|
|
||||||
curl -s -X POST https://slack.com/api/chat.postMessage \
|
curl -s -X POST https://slack.com/api/chat.postMessage \
|
||||||
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
|
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue