diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6521ba..b47e58d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,34 +51,16 @@ jobs: test_env=sepolia npx playwright test - name: Push Slack Notification - uses: slackapi/slack-github-action@v1.25.0 + uses: storyprotocol/gha-workflows/.github/workflows/reusable-slack-notifs.yml@main + if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' with: - channel-id: ${{ secrets.SLACK_CHANNEL_ID_API_INTEGRATION_TESTS }} - payload: | - { - "text": "${{ github.repository }}: API Integration Tests have been completed. Check the results at github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "blocks": [ - { "type": "divider" }, - { - "type": "image", - "title": { - "type": "plain_text", - "text": "Playwright Test Results" - }, - "image_url": "http://www.quickmeme.com/img/b9/b9848df257b95cd39585368475a4b4e4a3a8c774f7390226daecb79b912087ad.jpg", - "alt_text": "Playwright Test Results" - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text":"${{ github.repository }}: API Integration Tests have been completed. \nCheck the results at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" - } - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + short-desc: "${{ github.repository }}: API Integration Tests have been completed with failed test case(s). Check the results at github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + title: "Playwright Test Results" + img-url: "http://www.quickmeme.com/img/b9/b9848df257b95cd39585368475a4b4e4a3a8c774f7390226daecb79b912087ad.jpg" + img-alt-text: "Playwright Test Results" + secrets: + channel-name: ${{ secrets.SLACK_CHANNEL_ID_API_INTEGRATION_TESTS }} + slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} - name: Upload Test Results uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1