GHA: Batch URIs to invalidate on Akamai
This commit is contained in:
9
.github/actions/akamai-purge-osx/action.yml
vendored
9
.github/actions/akamai-purge-osx/action.yml
vendored
@@ -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..."
|
||||
|
||||
Reference in New Issue
Block a user