Skip to content

Get notified on Slack when a new version of your favorite repositories is released. Using Cloudflare Workers, CRON Triggers, and KV storage.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT
Notifications You must be signed in to change notification settings

eidam/cf-workers-github-releases

Cloudflare Worker - GitHub repository releases

Get notified on Slack when a new version of your favorite repositories is released. Using Cloudflare Workers, CRON Triggers, and KV storage.

slack-screenshot.png

Pre-requisites

You'll need a Cloudflare Workers account with

  • A workers domain set up
  • The Workers Bundled subscription ($5/mo)

Also, prepare the following secrets

  • Cloudflare API token with Edit Cloudflare Workers permissions
  • GitHub API personal token
  • Slack incoming webhook

Getting started

You can either deploy with Cloudflare Deploy Button using GitHub Actions or deploy on your own.

Deploy with Cloudflare Deploy Button

Deploy to Cloudflare Workers

  1. Click the button and follow the instructions, you should end up with a clone of this repository

  2. Navigate to your new GitHub repository > Settings > Secrets and add the following secrets:

    - Name: CF_API_TOKEN (should be added automatically)
    
    - Name: CF_ACCOUNT_ID (should be added automatically)
    
    - Name: SECRET_SLACK_WEBHOOK_URL
    - Value: your-slack-webhook-url
    
    - Name: SECRET_GITHUB_TOKEN
    - Value: your-porsonal-read-github-token
    
  3. Adjust index.js to list all of your repositories you want to watch

    const githubRepositories = [
      'eidam/cf-workers-github-releases',
      'cloudflare/wrangler',
      'cloudflare/wrangler-action',
      '...',
    ]
  4. Push to main branch to trigger the deployment

  5. 🎉

Deploy on your own

You can clone the repository yourself and use Wrangler CLI to develop/deploy, extra list of things you need to take care of:

  • create KV namespace and add the KV_GITHUB_RELEASES binding to wrangler.toml
  • create Worker secrets
    • SECRET_SLACK_WEBHOOK_URL
    • SECRET_GITHUB_TOKEN

Known issues

  • Max 25 repositories to watch, due to the limit of subrequests Cloudflare Worker can make (50).

    The plan is to support up to 49 by sending only one Slack notification per scheduled run.

About

Get notified on Slack when a new version of your favorite repositories is released. Using Cloudflare Workers, CRON Triggers, and KV storage.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT

Code of conduct

Stars

Watchers

Forks

Packages

No packages published