From df3e1432179fa98ce722a412607377f14d87ef16 Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Wed, 16 Oct 2024 14:56:07 +0530 Subject: [PATCH] logging data --- .github/actions/notify-slack/action.yml | 7 ++++++ .github/workflows/publish.yml | 33 ++++++++++++++----------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/.github/actions/notify-slack/action.yml b/.github/actions/notify-slack/action.yml index f2c38761..63886c4d 100644 --- a/.github/actions/notify-slack/action.yml +++ b/.github/actions/notify-slack/action.yml @@ -11,6 +11,9 @@ inputs: job_status: required: true description: "test" + job: + required: true + description: "test" runs: using: "composite" @@ -21,6 +24,10 @@ runs: run: | echo ${{inputs.alert_type}} echo ${{inputs.heading_text}} + echo ${{inputs.job_status}} + echo ${{github.repository}} + echo ${{github.sha}} + echo ${{inputs.job}} # - name: Send slack notification # id: slack diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 377e1ccd..dad1ad00 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -38,22 +38,24 @@ jobs: run: npm publish working-directory: xero-node - # notify-slack-on-success: - # runs-on: ubuntu-latest - # needs: publish - # if: success() - # steps: - # - name: Checkout xero-node repo - # uses: actions/checkout@v4 - # with: - # repository: XeroAPI/xero-node + notify-slack-on-success: + runs-on: ubuntu-latest + needs: publish + if: success() + steps: + - name: Checkout xero-node repo + uses: actions/checkout@v4 + with: + repository: XeroAPI/xero-node + path: xero-node + - # - name: Send slack notification on success - # uses: ./xero-node/.github/actions/notify-slack - # with: - # heading_text: "Publish job has succeeded !" - # alert_type: "good" - # job_status: ${{job.status}} + - name: Send slack notification on success + uses: ./xero-node/.github/actions/notify-slack + with: + heading_text: "Publish job has succeeded !" + alert_type: "good" + job_status: ${{job.status}} notify-slack-on-failure: runs-on: ubuntu-latest @@ -72,3 +74,4 @@ jobs: heading_text: "Publish job has failed, Please check the logs" alert_type: "danger" job_status: ${{job.status}} + job: ${{job}}