Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cpilsworth/cloudflare-worker-action
GitHub action for deploying a worker to Cloudflare
https://github.com/cpilsworth/cloudflare-worker-action
cloudflare-worker github-actions
Last synced: 6 days ago
JSON representation
GitHub action for deploying a worker to Cloudflare
- Host: GitHub
- URL: https://github.com/cpilsworth/cloudflare-worker-action
- Owner: cpilsworth
- Created: 2018-11-30T22:33:34.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-01T12:12:48.000Z (almost 6 years ago)
- Last Synced: 2024-08-01T16:33:58.713Z (3 months ago)
- Topics: cloudflare-worker, github-actions
- Language: Makefile
- Homepage:
- Size: 20.5 KB
- Stars: 18
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-cloudflare - GitHub Action - Deploy a worker on push to the master branch. (Workers / Tools)
- awesome-cloudflare - GitHub Action - Deploy a worker on push to the master branch. (Workers / Tools)
README
# Cloudflare Worker GitHub Action
[![Build Status](https://travis-ci.org/cpilsworth/cloudflare-worker-action.svg?branch=master)](https://travis-ci.org/cpilsworth/cloudflare-worker-action)
A GitHub action to deploy a Cloudflare Worker on push to the master branch.
```hcl
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](https://twitter.com/jessfraz) [aws-fargate-action](https://github.com/jessfraz/aws-fargate-action) GitHub action project. :trophy:
### Tests
The tests use [shellcheck](https://github.com/koalaman/shellcheck). You don't
need to install anything. They run in a container.```console
$ make test
```### Using the `Makefile`
```console
$ 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.
```