Skip to content

GitHub action for deploying a worker to Cloudflare

Notifications You must be signed in to change notification settings

cpilsworth/cloudflare-worker-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudflare Worker GitHub Action

Build Status

A GitHub action to deploy a Cloudflare Worker on push to the master branch.

workflow "on push to master, deploy worker to Cloudflare" {
  on = "push"
  resolves = ["worker deploy"]
}

action "worker deploy" {
  uses = "cpilsworth/cloudflare-worker-action@master"
  env = {
    CLOUDFLARE_EMAIL = "[email protected]",
    CLOUDFLARE_ZONE = "diffa.co.uk",
    WORKER_JS = "bin/worker.js",
  }
  secrets = [ "CLOUDFLARE_TOKEN" ]
}

Heavily inspired by Jessie Frazelle's aws-fargate-action GitHub action project. 🏆

Tests

The tests use shellcheck. You don't need to install anything. They run in a container.

$ make test

Using the Makefile

$ make help
cf-apply                      Run terraform apply for Amazon.
cf-destroy                    Run terraform destroy for Amazon.
cf-plan                       Run terraform plan for Amazon.
shellcheck                     Runs the shellcheck tests on the scripts.
test                           Runs the tests on the repository.
update-terraform               Update terraform binary locally from the docker container.
update                         Update terraform binary locally.

About

GitHub action for deploying a worker to Cloudflare

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published