Skip to content

Commit

Permalink
[CONTENT-7903] publish index file to the Cloudflare STG CDN (#27079)
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bianquetti <[email protected]>
Co-authored-by: Jorge Bianquetti <[email protected]>
  • Loading branch information
jbianquetti and jbianquetti-nami authored Jun 10, 2024
1 parent 95f69ae commit ee17e26
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/sync-chart-cloudflare-index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: '[Index] Sync bitnami/charts index.yaml to Cloudflare'

on:
push:
branches:
- index

# Remove all permissions by default
permissions: {}

jobs:
deploy:
name: Sync bitnami/charts index.yaml to Cloudflare
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@master
- name: Upload to Cloudflare using a BCOM upload proxy
env:
CLOUDFLARE_CLIENT_ID: ${{ secrets.CLOUDFLARE_CLIENT_ID }}
CLOUDFLARE_CLIENT_SECRET: ${{ secrets.CLOUDFLARE_CLIENT_SECRET }}
CLOUDFLARE_USER_AUTH: ${{ secrets.CLOUDFLARE_USER_AUTH }}
run: |
export TOKEN=$(curl -s --location 'https://api-espstg.broadcom.com/auth/oauth/v2/token' \
--data-urlencode "client_id=${CLOUDFLARE_CLIENT_ID}" \
--data-urlencode "client_secret=${CLOUDFLARE_CLIENT_SECRET}" \
--data-urlencode 'grant_type=client_credentials' | jq .access_token -r )
curl --location --request PUT 'https://api-espstg.broadcom.com/crushftp/fileUpload' \
--header "userAuth: Basic ${CLOUDFLARE_USER_AUTH}" \
--header 'filePath: /index.yaml' \
--header 'Content-Type: text/yaml' \
--header "Authorization: Bearer $TOKEN" \
--upload-file binami/index.yaml
File renamed without changes.

0 comments on commit ee17e26

Please sign in to comment.