Fixed secrets
@@ -275,17 +275,20 @@ jobs:
- name: Setup Cloudflare KV
if: matrix.component == 'state.cloudflare.kv'
+ env:
+ CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
CloudflareWorkerName="daprconfkv${{ github.run_id }}"
- CloudflareKVNamespaceID=$( curl -X POST "https://api.cloudflare.com/client/v4/accounts/${{ secrets.CLOUDFLARE_ACCOUNT_ID }}/storage/kv/namespaces" \
- -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}" \
+ CloudflareKVNamespaceID=$( curl -s -X POST "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/storage/kv/namespaces" \
+ -H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}" \
-H "Content-Type: application/json" \
--data "{\"title\":\"${CloudflareWorkerName}\"}" \
| jq -r ".result.id" )
echo "CloudflareWorkerName=${CloudflareWorkerName}" >> $GITHUB_ENV
- echo "CloudflareAPIToken=${{ secrets.CLOUDFLARE_API_TOKEN }}" >> $GITHUB_ENV
- echo "CloudflareAccountID=${{ secrets.CLOUDFLARE_ACCOUNT_ID }}" >> $GITHUB_ENV
+ echo "CloudflareAPIToken=${CLOUDFLARE_API_TOKEN}" >> $GITHUB_ENV
+ echo "CloudflareAccountID=${CLOUDFLARE_ACCOUNT_ID}" >> $GITHUB_ENV
echo "CloudflareKVNamespaceID=${CloudflareKVNamespaceID}" >> $GITHUB_ENV
- name: Start aws snssqs
@@ -424,13 +427,16 @@ jobs:
- name: Cleanup Cloudflare KV
if: always() && matrix.component == 'state.cloudflare.kv'
continue-on-error: true
+ env:
+ CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
# Delete the Worker
- curl -X DELETE "https://api.cloudflare.com/client/v4/accounts/${{ secrets.CLOUDFLARE_ACCOUNT_ID }}/workers/scripts/${{ env.CloudflareWorkerName }}" \
- -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}"
+ curl -X DELETE "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/workers/scripts/${{ env.CloudflareWorkerName }}" \
+ -H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}"
# Delete the KV namespace
- curl -X DELETE "https://api.cloudflare.com/client/v4/accounts/${{ secrets.CLOUDFLARE_ACCOUNT_ID }}/storage/kv/namespaces/${{ env.CloudflareKVNamespaceID }}" \
- -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}"
+ curl -X DELETE "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/storage/kv/namespaces/${{ env.CloudflareKVNamespaceID }}" \
+ -H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}"
# Download the required certificates into files, and set env var pointing to their names
- name: Clean up certs
