[GHA] Cleanup and cache purge via cloudflare action
This commit is contained in:
@@ -32,11 +32,8 @@ jobs:
|
||||
run: echo "date=`echo $(($(date +%s%N) / 1000000))`" >> $GITHUB_OUTPUT
|
||||
- name: Generate and Upload Aggregate Update Sites Data
|
||||
id: gen-aggregate-sites
|
||||
env:
|
||||
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..."
|
||||
invalid_urls=""
|
||||
site_url="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4-language-server-integrations/${{ inputs.version }}"
|
||||
${{ github.workspace }}/.github/scripts/generate-composite-site-files.sh ${{ steps.timestamp.outputs.date }} $site_url
|
||||
@@ -49,15 +46,9 @@ jobs:
|
||||
aws s3 cp ./p2.index s3://$AWS_S3_BUCKET/release/TOOLS/sts4-language-server-integrations/
|
||||
invalid_urls+="${DOWNLOAD_URL_ROOT}/release/TOOLS/sts4-language-server-integrations/p2.index"
|
||||
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 }}
|
||||
|
||||
Reference in New Issue
Block a user