Skip to content
This repository has been archived by the owner on Sep 6, 2020. It is now read-only.

3stacks/cloudflare-purge-cache-action

Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Cloudflare Purge Cache Action

This is a Github action. Read more about those here: https://developer.github.com/actions/

The default behaviour is to purge everything. If you don't want to blow your whole site cache away, make sure you define specific files using the fileList arg (ALPHA. DO NOT USE IN HIGH VALUE PIPELINES).

Usage

your-workflow.yml

    - name: Purge cache
      uses: 3stacks/cloudflare-purge-cache-action@1.0.1
      with:
        authToken: ${{ secrets.CLOUDFLARE_AUTH_TOKEN }}
        siteName: somesite.com
        authEmail: me@example.com
        fileList: <NOT YET OFFICIALLY SUPPORTED> "[\"http://somesite.com/index.html\",\"http://somesite.com/cat-picture.jpg\"]"

Arguments

All arguments are of type string.

Arg Name Required Default Value Description Reference
authToken Yes nil Generated on your user profile in Cloudflare. Store in secrets! https://api.cloudflare.com/#getting-started-requests
siteName Yes nil The name of the site/zone you're targeting
authEmail Yes nil The email associated with your Cloudflare account
fileList Yes nil This will be stringified JSON. See the format of files https://api.cloudflare.com/#zone-purge-files-by-url

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published