Cloudflare Purge Cache Action
Purge Cloudflare cache for a zone or list of zones with optional filters including files, prefixes, tags, and hosts.
Loaded with Features including job summary, fail mode, dry run, input conditionals, plus more Inputs and Outputs.
To get started, create or update your workflow file.
Workflow
Add the step to an existing workflow or create a new one.
- name: "Cloudflare Purge Cache"
uses: cssnr/cloudflare-purge-cache-action@v2
with:
token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
zones: cssnr.com,example.comname: "Cloudflare Purge Cache Action"
on:
push:
jobs:
test:
name: "Test"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: "Cloudflare Purge Cache"
uses: cssnr/cloudflare-purge-cache-action@v2
with:
token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
zones: |
cssnr.com
example.comHash Copied to Clipboard
Check out the Rolling Tags for more tag options.
See the Inputs Documentation for additional options and default values.
Features
- Flush one or multiple zones w/ inline conditionals.
- Flush based on files, tags, hosts, or prefixes.
- Option to prepend a path prefix to all files.
- Option to enable dry run and add job summary.
Don't see your feature here? Please help by submitting a Feature Request.
Rolling Tags
The following rolling tags are maintained to improve stability across updates.
| Version Tag | Rolling | Bugs | Feat. | Name | Target | Example |
|---|---|---|---|---|---|---|
| ✅ | ✅ | ✅ | Major | vN.x.x | vN | |
| ✅ | ✅ | ❌ | Minor | vN.N.x | vN.N | |
| ❌ | ❌ | ❌ | Micro | vN.N.N | vN.N.N |
You can view the release notes for each version on the releases page.
The Major tag is recommended. It is the most up-to-date and always backwards compatible. Breaking changes would result in a Major version bump. At a minimum you should use a Minor tag.
Tags Security Notice
As shown above, tags are mutable; however, commit hashes are not. Therefore, if security is your top priority, you should pin your actions to a specific commit hash.
WARNING
These docs are not finished. Please see the README.md on GitHub.
