From f289958dfe3b91e73fb91befb673dfce0c0cfcfe Mon Sep 17 00:00:00 2001 From: aboyko Date: Tue, 14 Nov 2023 20:56:10 -0500 Subject: [PATCH] GHA: Test Akamai purge cache --- .github/workflows/akamai-purge-cache.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/akamai-purge-cache.yml b/.github/workflows/akamai-purge-cache.yml index 618d975ab..25e53218c 100644 --- a/.github/workflows/akamai-purge-cache.yml +++ b/.github/workflows/akamai-purge-cache.yml @@ -23,6 +23,17 @@ jobs: aws-region: us-east-1 role-duration-seconds: 900 role-skip-session-tagging: true + - name: Create .edgerc file + run: | + echo "[ccu]" >> ${HOME}/.edgerc + echo "client_secret = ${{ secrets.AKAM_CLIENT_SECRET }}" >> ${HOME}/.edgerc + echo "host = ${{ secrets.AKAM_HOST }}" >> ${HOME}/.edgerc + echo "access_token = ${{ secrets.AKAM_ACCESS_TOKEN }}" >> ${HOME}/.edgerc + echo "client_token = ${{ AKAM_CLIENT_TOKEN }}" >> ${HOME}/.edgerc - name: Akamai Cache Purge via CLI run: | - aws s3 ls s3://tools-spring-io/${{ inputs.path }} --recursive | awk '{$1=$2=$3=""; print $0}' | sed -e 's/^[ \t]*/https:\/\/cdn.spring.io\/spring-tools\//' + aws s3 ls s3://tools-spring-io/${{ inputs.path }} --recursive | awk '{$1=$2=$3=""; print $0}' | sed -e 's/^[ \t]*/https:\/\/cdn.spring.io\/spring-tools\//' | akamai purge invalidate + - name: Akamai Cache Purge via CLI + if: ${{ always() }} + run: | + rm -f ${HOME}/.edgerc