Skip to content

EdgeWorker

EdgeWorker #10

name: EdgeWorker
on:
workflow_dispatch:
inputs:
testCodeBranch:
description: 'Test Code Branch'
required: true
default: 'stage'
type: string
edgeworker:
description: 'Edge Worker'
type: choice
required: true
default: 'Acrobat_DC_web_stg'
options:
- 'Acrobat_DC_web_stg'
- 'Acrobat_DC_web_prod'
network:
description: 'Network'
type: choice
required: true
default: 'staging'
options:
- 'staging'
- 'production'
description:
description: 'Bundle Description'
type: string
required: true
default: 'Bundle Description'
jobs:
deploy-edgeworker:
name: Deploy EdgeWorker
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.testCodeBranch }}
- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: ./node_modules
key: modules-${{ hashFiles('package-lock.json') }}-${{ runner.os }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
- name: Build Edge Worker Scripts
run: |
npm run ewbuild
npm run ewprod2stg
npm run ewsetbundle ${{ inputs.edgeworker }} "${{ inputs.description }}"
env:
EDGERC: ${{ secrets.AKAMAI_EDGERC }}
- name: Deploy Edge Worker
uses: jdmevo123/[email protected]
env:
EDGERC: ${{ secrets.AKAMAI_EDGERC }}
WORKER_DIR: edgeworkers/${{ inputs.edgeworker }}
with:
edgeworkersName: ${{ inputs.edgeworker }}
network: ${{ inputs.network }}
groupid: '58544'