From b6a31bfe83f6312b88ebd8efc45a180d348e7981 Mon Sep 17 00:00:00 2001 From: aboyko Date: Fri, 17 Nov 2023 11:33:53 -0500 Subject: [PATCH] GHA: Batch URIs to invalidate on Akamai --- .github/actions/akamai-purge-osx/action.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/actions/akamai-purge-osx/action.yml b/.github/actions/akamai-purge-osx/action.yml index b91ae53bc..7b3df5554 100644 --- a/.github/actions/akamai-purge-osx/action.yml +++ b/.github/actions/akamai-purge-osx/action.yml @@ -31,12 +31,11 @@ runs: for idx in $indices do end=${idx%:*} - echo "Index ${end}" new_length=$((end - offset)) if [ $new_length -ge $MAX ]; then - echo "Batch from ${offset} of length ${length}" + echo "Batch from offset ${offset} of length ${length}" batch=${urls:$offset:$length} - echo $batch + akamai purge --edgerc ~/.edgerc --section ccu ${{ inputs.command }} $batch offset=$((offset + length)) length=$((end - offset)) else @@ -45,9 +44,9 @@ runs: done if [ $length -gt 0 ]; then length=$((${#urls} - offset + 1)) - echo "Last Batch from ${offset} of length ${length}" + echo "Last Batch from offset ${offset} of length ${length}" batch=${urls:$offset:$length} - echo $batch + akamai purge --edgerc ~/.edgerc --section ccu ${{ inputs.command }} $batch fi else echo "Executing single Purge command..."