Notify workflow (ueberdosis/tiptap)
The Notify workflow from ueberdosis/tiptap, explained and optimized by Latchkey.
CI health: B - good
Point runs-on at Latchkey and get job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the Notify workflow from the ueberdosis/tiptap repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: Notify
on:
release:
types: [published]
jobs:
discord_notify:
name: Send release to Discord
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Post release to Discord (tsickert/discord-webhook)
uses: tsickert/discord-webhook@v7.0.0
with:
webhook-url: ${{ secrets.DISCORD_RELEASES_STABLE_WEBHOOK }}
embed-title: ${{ github.event.release.name || github.event.release.tag_name }}
embed-description: ${{ github.event.release.body }}
embed-url: ${{ github.event.release.html_url }}
wait: true
slack_release_notify:
name: Send release to Slack
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Send Slack release notification
uses: slackapi/slack-github-action@v3.0.3
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: webhook-trigger
payload: |
{
"message": ${{ toJSON(format('[Tiptap Editor {0}]: {1}\nRelease title: {2}\n{3}', github.event.release.prerelease && 'Pre-release' || 'Release', github.event.release.name || github.event.release.tag_name, github.event.release.html_url, github.event.release.body || 'No release notes provided.')) }}
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: Notify on: release: types: [published] jobs: discord_notify: timeout-minutes: 30 name: Send release to Discord if: github.event_name == 'release' runs-on: latchkey-small permissions: contents: read steps: - name: Post release to Discord (tsickert/discord-webhook) uses: tsickert/discord-webhook@v7.0.0 with: webhook-url: ${{ secrets.DISCORD_RELEASES_STABLE_WEBHOOK }} embed-title: ${{ github.event.release.name || github.event.release.tag_name }} embed-description: ${{ github.event.release.body }} embed-url: ${{ github.event.release.html_url }} wait: true slack_release_notify: timeout-minutes: 30 name: Send release to Slack if: github.event_name == 'release' runs-on: latchkey-small permissions: {} steps: - name: Send Slack release notification uses: slackapi/slack-github-action@v3.0.3 with: webhook: ${{ secrets.SLACK_WEBHOOK_URL }} webhook-type: webhook-trigger payload: | { "message": ${{ toJSON(format('[Tiptap Editor {0}]: {1}\nRelease title: {2}\n{3}', github.event.release.prerelease && 'Pre-release' || 'Release', github.event.release.name || github.event.release.tag_name, github.event.release.html_url, github.event.release.body || 'No release notes provided.')) }} } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Add a job timeout so a hung step cannot burn hours of runner time.
2 third-party actions are referenced by a movable tag. Pin them to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.
This workflow runs 2 jobs per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.