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
{{ message }}
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.
We're having a weird issue where env vars are interpolating but we can't seem to get a newline character to work. We've tried both single and double character escapes:
- name: Slack notification
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: Ilshidur/action-slack@2.0.2
with:
args: 'A merge to `App.dev` has occurred successfully. \\n
Commit ID: {{GITHUB_SHA}} \\n'
- name: Slack notification
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: Ilshidur/action-slack@2.0.2
with:
args: 'A merge to `App.dev` has occurred successfully. \n
Commit ID: {{GITHUB_SHA}} \n'
For some reason the \n or \\n just show up directly in the message without being interpreted. Could you please offer some guidance here?
Also great job on the rest of your documentation. Very easy to understand.
The text was updated successfully, but these errors were encountered:
We got this working by changing the single quote to double quote on the string parameter passed to args. I think it would be worth updating your docs with this bit.
Use double quotes. ☺️
here is the args for my beloved bot Illidan Stormrage:
with:
args: "*BUILD failed*\n_You are not prepared._"
It's needed to investigate further ahead why it's necessary, and how far that 'real' line break you added after the \n is maybe affecting anything.
and maybe a PR tweak it so people also don't fall in this pit.
a guess is maybe the double quote tells the YAML parser interpolate that line..
(like in the command line behaviour, e.g: echo 'I am $USER' versus: echo "I am $USER")
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We're having a weird issue where env vars are interpolating but we can't seem to get a newline character to work. We've tried both single and double character escapes:
For some reason the
\n
or\\n
just show up directly in the message without being interpreted. Could you please offer some guidance here?Also great job on the rest of your documentation. Very easy to understand.
The text was updated successfully, but these errors were encountered: