learn-custom-metrics: Unwritten scorecard for custom metrics #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | | ||
|
Check failure on line 26 in .github/workflows/post-slack-message.yml
|
||
| 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 }} | ||