Skip to content

Commit

Permalink
try saving a file
Browse files Browse the repository at this point in the history
  • Loading branch information
pingevt committed Sep 15, 2024
1 parent f40b9b8 commit af30e06
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions .github/workflows/testing-slack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: |
node -e '
const fs = require("fs-extra");
const filePath = "./payload.json";
const filePath = "./payload_template.json";
const json = fs.readJSONSync(filePath);
json.blocks.push({
Expand All @@ -51,7 +51,7 @@ jobs:
}
});
fs.writeJSONSync(filePath, json, { spaces: 2 });
fs.writeJSONSync("./payload.json", json, { spaces: 2 });
'
# C07MUHXPX97
Expand All @@ -66,6 +66,12 @@ jobs:
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

- name: Upload message file.
uses: actions/upload-artifact@v4
with:
name: message_payload
path: ./payload.json



update_1:
Expand All @@ -81,6 +87,11 @@ jobs:
- uses: qoomon/actions--context@v2
id: context

- name: Download message Payload
uses: actions/download-artifact@v4
with:
name: message_payload

# Debugger
- uses: hmarr/debug-action@v2

Expand Down Expand Up @@ -193,6 +204,11 @@ jobs:
- uses: qoomon/actions--context@v2
id: context

- name: Download message Payload
uses: actions/download-artifact@v4
with:
name: message_payload

- uses: slackapi/[email protected]
with:
channel-id: "C07MUHXPX97"
Expand Down Expand Up @@ -238,6 +254,11 @@ jobs:
- uses: qoomon/actions--context@v2
id: context

- name: Download message Payload
uses: actions/download-artifact@v4
with:
name: message_payload

- name: Messages to env var
run: |
MARKDOWN_CONTENTS=$(cat message.md)
Expand All @@ -246,9 +267,9 @@ jobs:
# echo "EOF" >> $GITHUB_ENV
MARKDOWN_CONTENTS2=${MARKDOWN_CONTENTS//$'\r\n'/}
echo ${MARKDOWN_CONTENTS2}
MARKDOWN_CONTENTS2=${MARKDOWN_CONTENTS2//"📝"/}
MARKDOWN_CONTENTS2=${MARKDOWN_CONTENTS2//📝/}
echo ${MARKDOWN_CONTENTS2}
MARKDOWN_CONTENTS2=${MARKDOWN_CONTENTS2//"❌"/}
MARKDOWN_CONTENTS2=${MARKDOWN_CONTENTS2//❌/}
echo ${MARKDOWN_CONTENTS2}
echo "MARKDOWN_CONTENTS2=$MARKDOWN_CONTENTS2" >> $GITHUB_ENV
Expand Down
File renamed without changes.

0 comments on commit af30e06

Please sign in to comment.