[GHA] Cleanup and cache purge via cloudflare action

This commit is contained in:
aboyko
2024-07-12 14:25:06 -04:00
parent 5144d97b1c
commit 62dd211877
8 changed files with 32 additions and 157 deletions

View File

@@ -40,7 +40,7 @@ jobs:
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
run: |
echo "Akamai S3 Aggregate Update Sites Creation..."
echo "S3 Aggregate Update Sites Creation..."
dirs=`aws s3 ls s3://${AWS_S3_BUCKET}/release/TOOLS/sts4/update/${{ inputs.version }}/`
echo "${dirs}"
pattern='^e[0-9]+.[0-9]+/$'
@@ -76,15 +76,10 @@ jobs:
fi
done
echo "invalid_urls=$invalid_urls" >> $GITHUB_OUTPUT
purge_cache:
needs: [ update-aggregate-update-sites ]
runs-on: [self-hosted]
steps:
- uses: ./.github/actions/akamai-purge-osx
- uses: ./.github/actions/cloudflare-purge
name: Invalidate URLs
env:
EDGERC: ${{ secrets.EDGERC }}
with:
command: invalidate
urls: ${{ needs.update-aggregate-update-sites.outputs.invalid_urls }}
urls: ${{ steps.gen-aggregate-sites.outputs.invalid_urls }}
cloudflare_zone_id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
cloudflare_cache_token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}