diff --git a/.github/workflows/coveo.yml b/.github/workflows/coveo.yml index fee7b693a..8ea85b273 100644 --- a/.github/workflows/coveo.yml +++ b/.github/workflows/coveo.yml @@ -8,6 +8,9 @@ jobs: generate-coveo-search-token: name: Generate Coveo Search Tokens runs-on: ubuntu-latest + permissions: + contents: read + actions: read # for 8398a7/action-slack strategy: matrix: include: @@ -69,8 +72,31 @@ jobs: name: ${{matrix.env_name}} path: "./" + - name: Send a notification if token generation step failed + if: ${{ steps.generate-token.outcome == 'failure' }} + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 + with: + status: custom + custom_payload: | + { + username: 'Github', + mention: 'channel', + attachments: [{ + title: '[${{ github.event.repository.full_name }}] Coveo Token Generation Failed (${{matrix.env_name}} environment)', + color: 'danger', + fields: [{ + title: 'Pipeline URL', + value: '', + short: false + }] + }] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_DOCS_INCIDENT }} + + push-tokens-to-azure: - name: Push coveo search tokens to Azure + name: Batch push coveo search tokens to Azure runs-on: ubuntu-latest needs: generate-coveo-search-token steps: