Bump calibreapp/image-actions from 82caf2e46a1950e602c8440fde4730ec1da6fef4 to 006692e15ca7d6312e06cc49b57a466d8ed45848 #211
Workflow file for this run
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: Notify on Handbook Changes | |
| on: | |
| pull_request: | |
| types: | |
| - closed | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| check-changes: | |
| name: Verify changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| handbook_has_been_updated: ${{ steps.changed-files.outputs.handbook_changed }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Find changed files | |
| id: changed-files | |
| run: | | |
| ./.github/scripts/detect_changed_files.sh | |
| notify-slack: | |
| name: Send notification | |
| needs: check-changes | |
| if: | | |
| github.event.pull_request.merged == true && | |
| needs.check-changes.outputs.handbook_has_been_updated == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate URLs | |
| id: generate-urls | |
| run: | | |
| ./.github/scripts/generate_handbook_urls.sh | |
| - name: Send notification | |
| uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0 | |
| with: | |
| method: chat.postMessage | |
| token: ${{ secrets.SLACK_GHBOT_TOKEN }} | |
| payload: | | |
| { | |
| "unfurl_links": true, | |
| "unfurl_media": true, | |
| "channel": "C02UNQAFZPV", | |
| "blocks": [ | |
| { | |
| "type": "header", | |
| "text": { | |
| "type": "plain_text", | |
| "text": "📚 Handbook Update", | |
| "emoji": true | |
| } | |
| }, | |
| { | |
| "type": "section", | |
| "text": { | |
| "type": "mrkdwn", | |
| "text": "Our handbook has been updated with new information." | |
| } | |
| }, | |
| { | |
| "type": "divider" | |
| }, | |
| { | |
| "type": "section", | |
| "fields": [ | |
| { | |
| "type": "mrkdwn", | |
| "text": "*Author:*\n${{ github.event.pull_request.user.login }}" | |
| }, | |
| { | |
| "type": "mrkdwn", | |
| "text": "*Updated at:*\n${{ github.event.pull_request.merged_at }}" | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "section", | |
| "text": { | |
| "type": "mrkdwn", | |
| "text": "*Summary of Changes:*\n${{ github.event.pull_request.title }}" | |
| } | |
| }, | |
| { | |
| "type": "section", | |
| "text": { | |
| "type": "mrkdwn", | |
| "text": "*New/modified pages:*\n${{ steps.generate-urls.outputs.handbook_urls }}" | |
| } | |
| }, | |
| { | |
| "type": "divider" | |
| }, | |
| { | |
| "type": "actions", | |
| "elements": [ | |
| { | |
| "type": "button", | |
| "text": { | |
| "type": "plain_text", | |
| "text": "View Merged Pull Request", | |
| "emoji": true | |
| }, | |
| "style": "primary", | |
| "url": "${{ github.event.pull_request.html_url }}", | |
| "value": "view_changes" | |
| } | |
| ] | |
| } | |
| ] | |
| } | |