Skip to content
name: Jacob's actions experiments
on:
push:
branches:
- jacobs-actions-experiments
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
test-job-always-fails:
runs-on: ubuntu-latest
steps:
# - name: Checkout code needed for composite action
# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# with:
# sparse-checkout: |
# .github/actions/slack-error-notification/action.yml
# # sparse-checkout-cone-mode: false
- name: Always fail
run: |
pwd
exit 1
# - name: Notify errors in slack - composite
# if: failure()
# uses: ./.github/actions/slack-error-notification
# env:
# JOB_STATUS: ${{ job.status }}
# EVENT_URL: ${{ github.event.pull_request.html_url || github.event.head.html_url }}
# RUN_URL: https://github.com/fleetdm/fleet/actions/runs/${{ github.run_id }}\n${{ github.event.pull_request.html_url || github.event.head.html_url }}
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_G_HELP_ENGINEERING_WEBHOOK_URL }}
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Slack Notification
if: failure()
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0
with:
payload: |
{
"text": "${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head.html_url }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<Jacob GH aciton testing - disregard this notification > ${{ github.action }} > ${{ github.job}} result: ${{ job.status }}\nhttps://github.com/fleetdm/fleet/actions/runs/${{
github.run_id }}\n${{ github.event.pull_request.html_url ||
github.event.head.html_url }}"
}
}
]
}
env:
JOB_STATUS: ${{ job.status }}
EVENT_URL: ${{ github.event.pull_request.html_url || github.event.head.html_url }}
RUN_URL: https://github.com/fleetdm/fleet/actions/runs/${{ github.run_id }}\n${{ github.event.pull_request.html_url || github.event.head.html_url }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_G_HELP_ENGINEERING_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK