Skip to content

Commit

Permalink
ci: fix slackify of markdown code (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored May 10, 2023
1 parent 0211d01 commit 252be38
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/actions/slackify-markdown/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,15 @@ runs:
- name: Slackify
uses: actions/github-script@v6
id: slackify
env:
MARKDOWN: ${{ inputs.markdown }}
with:
script: |
const slackifyMarkdown = require('slackify-markdown');
try {
const md = `${{ inputs.markdown }}`;
const splitLines = str => str.split(/\r?\n/);
let stringmd = ""
for (val of splitLines(md)){
stringmd += val + "\n \ "
}
const mrkdwn = slackifyMarkdown(stringmd);
const md = process.env.MARKDOWN;
const mrkdwn = slackifyMarkdown(md);
core.setOutput('text', mrkdwn);
} catch (error) {
core.setFailed(error.message);
Expand Down

0 comments on commit 252be38

Please sign in to comment.