1
0
mirror of https://github.com/tormachris/cf-workers-status-page.git synced 2024-11-01 05:46:09 +01:00

fail open on kv create

This commit is contained in:
Adam Janiš 2022-05-06 13:30:06 +01:00 committed by GitHub
parent 998e3a9db9
commit 4394c872f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@ jobs:
command: publish --env production command: publish --env production
wranglerVersion: beta wranglerVersion: beta
preCommands: | preCommands: |
wrangler kv:namespace create KV_STATUS_PAGE wrangler kv:namespace create KV_STATUS_PAGE || echo "KV namespace already exists"
apt-get update && apt-get install -y jq apt-get update && apt-get install -y jq
export KV_NAMESPACE_ID=$(wrangler kv:namespace list | jq -c 'map(select(.title | contains("KV_STATUS_PAGE")))' | jq -r ".[0].id") export KV_NAMESPACE_ID=$(wrangler kv:namespace list | jq -c 'map(select(.title | contains("KV_STATUS_PAGE")))' | jq -r ".[0].id")
echo "[env.production]" >> wrangler.toml echo "[env.production]" >> wrangler.toml