From f7d5bf1310f9f662ee4fa115e22bf7045c96fdb0 Mon Sep 17 00:00:00 2001 From: Lam Nguyen Date: Fri, 10 Oct 2025 06:01:50 -0700 Subject: [PATCH 1/3] Workflow: Add monitoring to coveo token generation --- .github/workflows/coveo.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coveo.yml b/.github/workflows/coveo.yml index fee7b693a..2a0540638 100644 --- a/.github/workflows/coveo.yml +++ b/.github/workflows/coveo.yml @@ -69,8 +69,36 @@ 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 }}] ${{ github.workflow }} pipeline has failed. Token generation for environment ${{matrix.env_name}}', + color: 'danger', + fields: [{ + title: 'Commit', + "value": "", + short: false + }, + { + title: 'Pipeline URL', + value: ' Date: Fri, 10 Oct 2025 06:11:56 -0700 Subject: [PATCH 2/3] fixed bugs + polished messaging --- .github/workflows/coveo.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coveo.yml b/.github/workflows/coveo.yml index 2a0540638..7970a4347 100644 --- a/.github/workflows/coveo.yml +++ b/.github/workflows/coveo.yml @@ -79,16 +79,11 @@ jobs: username: 'Github', mention: 'channel', attachments: [{ - title: '[${{ github.event.repository.full_name }}] ${{ github.workflow }} pipeline has failed. Token generation for environment ${{matrix.env_name}}', + title: '[${{ github.event.repository.full_name }}] Coveo Token Generation Failed (${{matrix.env_name}} environment)', color: 'danger', fields: [{ - title: 'Commit', - "value": "", - short: false - }, - { title: 'Pipeline URL', - value: '', short: false }] }] From ea6d6c08ad3328d0233a6411e8a6321b69837a1e Mon Sep 17 00:00:00 2001 From: Lam Nguyen Date: Fri, 10 Oct 2025 06:16:54 -0700 Subject: [PATCH 3/3] fixed permissions issue --- .github/workflows/coveo.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/coveo.yml b/.github/workflows/coveo.yml index 7970a4347..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: