Skip to content

resource-published #1591

resource-published

resource-published #1591

Workflow file for this run

on:
repository_dispatch:
types:
- resource-published
jobs:
print:
runs-on: ubuntu-latest
steps:
- run: |
echo "Status: ${{ github.event.client_payload.status }}"
echo "Path: ${{ github.event.client_payload.path }}"
slack:
runs-on: ubuntu-latest
steps:
- name: Format path
id: format
uses: frabert/replace-string-action@v2
with:
pattern: '\.md'
string: ${{ github.event.client_payload.path }}
replace-with: ''
- name: Notify Slack (JSON)
if: ${{ endsWith(github.event.client_payload.path, '.json') }}
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
# For posting a rich message using Block Kit
payload: |
{
"text": "Just published: `${{ github.event.client_payload.path }}`"
}
- name: Notify Slack (Markdown)
if: ${{ endsWith(github.event.client_payload.path, '.md') }}
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
# For posting a rich message using Block Kit
payload: |
{
"text": "Just published: https://www.aem.live${{ steps.format.outputs.replaced }}"
}