Purge Akamai Cache #680
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Purge Akamai Cache' | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tags_to_purge: | |
| description: 'Tags to purge (comma-separated)' | |
| required: true | |
| default: 'docs.nvidia.com-networking-ethernet-software-automation-prod' | |
| jobs: | |
| purge: | |
| runs-on: ubuntu-latest | |
| environment: Prod | |
| steps: | |
| - name: Install Python and dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y python3 python3-pip | |
| pip3 install requests edgegrid-python | |
| - name: Checkout the repo | |
| uses: actions/checkout@v4 | |
| - name: Purge Akamai cache tags (production) | |
| run: python3 utils/akamai_purge.py | |
| env: | |
| AKAMAI_HOST: ${{ secrets.AKAMAI_HOSTNAME }} | |
| AKAMAI_CLIENT_TOKEN: ${{ secrets.AKAMAI_CLIENT_TOKEN }} | |
| AKAMAI_CLIENT_SECRET: ${{ secrets.AKAMAI_CLIENT_SECRET }} | |
| AKAMAI_ACCESS_TOKEN: ${{ secrets.AKAMAI_ACCESS_TOKEN }} | |
| AKAMAI_NETWORK_ENVIRONMENT: 'production' | |
| AKAMAI_TAGS_TO_INVALIDATE: ${{ github.event.inputs.tags_to_purge }} | |
| AKAMAI_ACTION: 'delete' |