automatically update versions in Cloudflare KV store

This commit is contained in:
proddy
2026-04-25 11:42:26 +02:00
parent 112adf9eb0
commit 147c09ae64
2 changed files with 16 additions and 0 deletions

View File

@@ -77,3 +77,11 @@ jobs:
files: | files: |
CHANGELOG_LATEST.md CHANGELOG_LATEST.md
./build/firmware/*.* ./build/firmware/*.*
- name: Update version in Cloudflare KV store
run: |
JSON_DATA='{"version": "${{steps.build_info.outputs.VERSION}}", "date": "$(date -u +%Y-%m-%d)"}'
curl -X PUT "https://api.cloudflare.com/client/v4/accounts/${{ secrets.CF_ACCOUNT_ID }}/storage/kv/namespaces/${{ secrets.CF_NAMESPACE_ID }}/values/dev" \
-H "Authorization: Bearer ${{ secrets.CF_API_TOKEN }}" \
-H "Content-Type: text/plain" \
-d "$JSON_DATA"

View File

@@ -61,3 +61,11 @@ jobs:
files: | files: |
CHANGELOG.md CHANGELOG.md
./build/firmware/*.* ./build/firmware/*.*
- name: Update version in Cloudflare KV store
run: |
JSON_DATA='{"version": "${{ github.event.release.tag_name }}", "date": "$(date -u +%Y-%m-%d)"}'
curl -X PUT "https://api.cloudflare.com/client/v4/accounts/${{ secrets.CF_ACCOUNT_ID }}/storage/kv/namespaces/${{ secrets.CF_NAMESPACE_ID }}/values/stable" \
-H "Authorization: Bearer ${{ secrets.CF_API_TOKEN }}" \
-H "Content-Type: text/plain" \
-d "$JSON_DATA"