-
Notifications
You must be signed in to change notification settings - Fork 0
Setting up Authentication
Cyb3r Jak3 edited this page Jul 11, 2021
·
2 revisions
Follow this guide to generate an API Token for use with action.
- Log in to Cloudflare and go to My Profile -> API Tokens Generate Custom Token
- The permissions for the token need to be set to Zone -> Cache Purge -> Purge
- Once the token has been created, copy it into a secret on Github and you will be able to use it.
Example workflow:
- name: Clear Cloudflare cache
uses: Cyb3r-Jak3/action-cloudflare-cache@<Latest Release>
env:
zone: ${{ secrets.CLOUDFLARE_ZONE }}
api_token: ${{ secrets.CLOUDFLARE_TOKEN }}
Follow this guide to use the Global Auth method.
- Log in to Cloudflare and go to My Profile -> API Tokens -> Global API Key
- You will need to enter your password to get the key.
- Copy that key into a secret on Github and you will be able to use it.
Example Workflow:
- name: Clear Cloudflare cache
uses: Cyb3r-Jak3/cloudflare-cache-cleaner@<Latest Release>
env:
zone: ${{ secrets.CLOUDFLARE_ZONE }}
email: ${{ secrets.CLOUDFLARE_EMAIL }}
global_token: ${{ secrets.CLOUDFLARE_KEY }}