Skip to content

Bump oxsecurity/megalinter from 8.1.0 to 8.3.0 #95

Bump oxsecurity/megalinter from 8.1.0 to 8.3.0

Bump oxsecurity/megalinter from 8.1.0 to 8.3.0 #95

name: Test Alert Workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
apply:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Save Commit Header
run: |
echo "COMMIT_MESSAGE_HEADER=$(git log -1 --pretty=%B | head -n 1)" >> "${GITHUB_ENV}"
- name: Slack failure notification
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":x: *GitHub Workflow Failed!* \n\nA workflow has failed in the repository *<https://github.com/${{ github.repository }}|${{ github.repository }}>*.\n\n*Workflow:* `${{ github.workflow }}`\n*Branch:* `${{ github.ref_name }}`\n*Commit:* `${{ github.sha }}` - _`${{ env.COMMIT_MESSAGE_HEADER }}`_\n*Author:* `${{ github.event.head_commit.author.name }}`"}},
{
"type": "actions",
"elements":[
{
"type":"button",
"text": {
"type": "plain_text",
"text":"View Workflow"
},
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"style": "primary"
},
{
"type": "button",
"text": {
"type":"plain_text",
"text":"View Commit"
},
"url":"https://github.com/${{ github.repository }}/commit/${{ github.sha }}"
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_TESTING }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK