Skip to content

Commit

Permalink
logging data
Browse files Browse the repository at this point in the history
  • Loading branch information
sangeet-joy_xero committed Oct 16, 2024
1 parent 7f53186 commit df3e143
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
7 changes: 7 additions & 0 deletions .github/actions/notify-slack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
job_status:
required: true
description: "test"
job:
required: true
description: "test"

runs:
using: "composite"
Expand All @@ -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
Expand Down
33 changes: 18 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -72,3 +74,4 @@ jobs:
heading_text: "Publish job has failed, Please check the logs"
alert_type: "danger"
job_status: ${{job.status}}
job: ${{job}}

0 comments on commit df3e143

Please sign in to comment.