Skip to content

Commit

Permalink
Final Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
palani-sayari committed Nov 18, 2024
1 parent 131ce6f commit 60729b9
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,14 @@ jobs:
needs: [compile, test, run-examples]
runs-on: ubuntu-latest
if: success()
env:
GITHUB_TOKEN: ${{ github.token }}
WEBHOOK_URL: ${{ secrets.GH_ACTION_WEBHOOK_URL }}
GITHUB_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
REPOSITORY: ${{ github.repository }}
steps:
- name: Check for PR on the branch and get reviewers
id: pr_check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Fetch open PRs for the branch using GitHub API
PR_NUMBER=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
Expand All @@ -111,10 +114,6 @@ jobs:
fi
- name: Send Slack Notification
env:
WEBHOOK_URL: ${{ secrets.GH_ACTION_WEBHOOK_URL }}
GITHUB_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
REPOSITORY: ${{ github.repository }}
run: |
# Branch, PR, and reviewers info
BRANCH=${{ github.ref_name }}
Expand Down Expand Up @@ -149,20 +148,19 @@ jobs:
curl -X POST -H 'Content-type: application/json' \
--data "{\"text\":\"$MESSAGE\"}" $WEBHOOK_URL
notify-slack-publish:
name: Notify Slack - Publish Job Completed
needs: [publish]
runs-on: ubuntu-latest
if: success()
env:
WEBHOOK_URL: ${{ secrets.GH_ACTION_WEBHOOK_URL }}
GITHUB_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
steps:
- name: Send Slack Notification
env:
WEBHOOK_URL: ${{ secrets.GH_ACTION_WEBHOOK_URL }}
GITHUB_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
BRANCH=${{ github.ref_name }}
MESSAGE="Publish job for branch *${BRANCH}* completed successfully. Package is now available. See details here: $GITHUB_RUN_URL"
MESSAGE="Publish job for branch *${BRANCH}* completed successfully. Package is now available. See details here: <${GITHUB_RUN_URL}|Click here>"
curl -X POST -H 'Content-type: application/json' \
--data "{\"text\":\"$MESSAGE\"}" $WEBHOOK_URL

0 comments on commit 60729b9

Please sign in to comment.