Skip to content

Commit

Permalink
Testing a few more things
Browse files Browse the repository at this point in the history
  • Loading branch information
pingevt committed Sep 15, 2024
1 parent a1d4e0a commit 79ced8d
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 9 deletions.
79 changes: 70 additions & 9 deletions .github/workflows/testing-slack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
const fs = require("fs-extra");
const filePath = "./payload.json";
const json = fs.readJSONSync(filePath);
json.blocks[3].elements[1].elements[1].elements[0].name = "green_circle";
json.blocks[3].elements[1].elements[1].elements[0].name = "large_green_circle";
fs.writeJSONSync(filePath, json, { spaces: 2 });
'
Expand All @@ -154,15 +154,21 @@ jobs:
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

- name: update payload
# - name: update payload
# run: |
# node -e '
# const fs = require("fs-extra");
# const filePath = "./payload.json";
# const json = fs.readJSONSync(filePath);
# json.blocks[3].elements[1].elements[2].elements[0].name = "large_green_circle";
# fs.writeJSONSync(filePath, json, { spaces: 2 });
# '

- name: Check jq
run: |
node -e '
const fs = require("fs-extra");
const filePath = "./payload.json";
const json = fs.readJSONSync(filePath);
json.blocks[3].elements[1].elements[2].elements[0].name = "green_circle";
fs.writeJSONSync(filePath, json, { spaces: 2 });
'
jq '.blocks[3].elements[1].elements[2].elements[0].name = "large_green_circle"' payload.json > temp.json
mv -- temp.json payload.json
rm -f -- temp.json
- uses: slackapi/[email protected]
with:
Expand Down Expand Up @@ -216,3 +222,58 @@ jobs:
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}



reply_2:
runs-on: ubuntu-latest
needs: initial_msg
steps:

- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref || github.ref_name }}

- uses: qoomon/actions--context@v2
id: context

- name: Messages to env var
if: ${{ env.SHOULD_BUILD_JOB == 'true' && env.PR_NUMBER != 0 }}
run: |
# (echo "MESSAGE_MD_VAR=$(cat message.md)") >> "$GITHUB_ENV"
MARKDOWN_CONTENTS=$(cat message.md)
MARKDOWN_CONTENTS=${MARKDOWN_CONTENTS//$'\r\n'/}
echo "MARKDOWN_CONTENTS<<EOF" >> $GITHUB_ENV
echo "$MARKDOWN_CONTENTS" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- uses: slackapi/[email protected]
with:
channel-id: "C07MUHXPX97"
payload: |
{
"thread_ts": "${{ needs.initial_msg.outputs.slack_msg_ts }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ""
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "Results",
"emoji": true
},
"value": "phpstan_results",
"url": "${{ steps.context.outputs.job_log_url }}",
"action_id": "button-action"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
6 changes: 6 additions & 0 deletions message.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## &#x1F4DD; BackstopJS Report:


&#x274C; **Visual regression test failed!**

[VR Report](https://live-connect-bluecadet.pantheonsite.io/sites/default/files/vis-reg-reports/20240914-203232/artifacts/backstop_data/html_report/index.html)

0 comments on commit 79ced8d

Please sign in to comment.