Skip to content

jdmevo123/akamai-edgeworker-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

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Akamai logo

GitHub Action to deploy Akamai EdgeWorkers

GitHub license

Deploy Akamai EdgeWorkers

This action calls the Akamai Api's to deploy EdgeWorkers to the Akamai platform. There are two pipelines in place for your repository, create an EdgeWorker (register) or upload a new version to an existing EdgeWorker. In both cases your EdgeWorker bundle will be uploaded and activated to the network you have selected. The action will execute the necessary pipeline when it executes.

Edgeworkers

Usage

Setup your repository with the following files:

<repository name>
            - bundle.json
            - main.js
            - utils/somejs.js

EdgeWorker pipeline flow:

Pipeline flow

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

Authentication

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

[edgeworkers]
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

edgeworkersName

Required Edgeworker name: Currently set to use repository name

network

Required Network:

  • staging
  • production Defaults to staging

groupid

Required Akamai groupid to assign new registrations to

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.

steps:
    - uses: actions/checkout@v1
    - name: Deploy Edgeworkers
      uses: jdmevo123/[email protected]
      env:
        EDGERC: ${{ secrets.AKAMAI_EDGERC }}
        WORKER_DIR: workerdirname # Optional directory for worker code (relative)
      with:
        edgeworkersName: ${{ github.event.repository.name }}
        network: 'staging'
        groupid: '12345' #Akamai GroupID used for registering new edgeworkers

License

This project is distributed under the MIT license.