Skip to content

learn-entity-relationships: Unwritten scorecard for Entity Relationships #8

learn-entity-relationships: Unwritten scorecard for Entity Relationships

learn-entity-relationships: Unwritten scorecard for Entity Relationships #8

name: Post Slack message
on:
push:
branches:
- main
paths:
- 'data/scorecards/**'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
- name: Post Slack Message
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
message="Updated content has been published to <https://github.com/${GITHUB_REPOSITORY}|Learn Cortex>\n"
message="${message}*Description*: ${{ github.event.head_commit.message }}\n"
message="${message}*Actor*: ${GITHUB_ACTOR}\n"
for file in ${ALL_CHANGED_FILES}; do
message="${message}*File:* <https://github.com/${GITHUB_REPOSITORY}/blob/main/$file|$file> was changed\n"
done
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"${message}\"}" ${{ env.SLACK_WEBHOOK_URL }}