Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions .github/workflows/auto-simple-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,30 @@ jobs:
path: playwright-report/
retention-days: 7

- name: Post to Slack
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
post-slack-notification-started:
runs-on: ubuntu-latest
steps:
- name: Get current date and time
id: date
run: |
curl -X POST -H 'Content-type: application/json' \
--data '{"text":"Simple suite results are ready"}' \
$SLACK_WEBHOOK_URL
RUN_DATE=$(date -u +%Y-%m-%d)
RUN_TIME=$(date -u +%H:%M:%S)
echo "date=$RUN_DATE" >> $GITHUB_OUTPUT
echo "time=$RUN_TIME" >> $GITHUB_OUTPUT

- name: Post a message in a channel
uses: slackapi/slack-github-action@v2.1.1
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
blocks:
- type: "header"
text:
type: "plain_text"
text: "🚀 Simple suite pipeline started"
- type: "divider"
- type: "section"
text:
type: "mrkdwn"
text: "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | View workflow run>"