Skip to content

jdmevo123/akamai-purge-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Akamai logo

GitHub Action to Purge Akamai Cache 🗑️

GitHub license

Purge Akamai Cache

This simple action calls the Akamai Api's to purge the cache of your website, which assists in clearing the cache after deploying a new application version.

Usage

All sensitive variables should be set as encrypted secrets in the action's configuration.

Authentication

You need to declare a EDGERC secret in your repository containing the following structure :

[ccu]
client_secret = your_client_secret
host = your_host
access_token = your_access_token
client_token = your_client_token

You can retrieve these from Akamai Control Center >> Identity Management >> API User.

Inputs

command

Required Purge action you wish to run:

  • invalidate : Invalidate all cache on the Akamai edge platform
  • delete : Delete(remove) all cache from the Akamai edge platform
  • Note: use caution when deleting all cache from the Akamai edge platform

type

Required Type of purge required:

  • cpcode : Purge by cpcode
  • tag : Purge by Cache Tag
  • url : Purge by url

ref

Required CPCode, Cache Tag or url's to purge

workflow.yml Example

Place in a .yml file such as this one in your .github/workflows folder. Refer to the documentation on workflow YAML syntax here.

- name: Clear Cache
      uses: jdmevo123/akamai-purge-action@1.7
      env:
        EDGERC: ${{ secrets.EDGERC }}
      with:
        command: 'invalidate' 
        type: 'cpcode' #valid inputs are 'cpcode', 'url' and 'tag'
        ref: '12345' #input url's as 'https://www.example.com/ https://www.example1.com/'
        network: 'production'

License

This project is distributed under the MIT license.