fix: duplicate account_id in actions, typo fix
parent
0c6556eda9
commit
4963a4815a
|
|
@ -67,7 +67,7 @@ jobs:
|
|||
terraform apply -auto-approve -input=false
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
TF_VAR_CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID || steps.fetch_account_id.outputs.account_id }}
|
||||
TF_VAR_CLOUDFLARE_ACCOUNT_ID: ${{ steps.fetch_account_id.outputs.account_id }}
|
||||
|
||||
# Still need to upload worker to keep it up-to-date (Terraform will fail after first-time setup)
|
||||
- name: Upload worker
|
||||
|
|
@ -75,7 +75,7 @@ jobs:
|
|||
curl --fail-with-body -X PUT https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/workers/scripts/uptimeflare_worker/content --header 'Authorization: Bearer '$CLOUDFLARE_API_TOKEN -F 'index.js=@worker/dist/index.js;type=application/javascript+module' -F 'metadata={"main_module": "index.js"}'
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID || steps.fetch_account_id.outputs.account_id }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ steps.fetch_account_id.outputs.account_id }}
|
||||
|
||||
# Currently Terraform Cloudflare provider doesn't support direct upload, use wrangler to upload instead.
|
||||
- name: Upload pages
|
||||
|
|
@ -83,4 +83,4 @@ jobs:
|
|||
npx wrangler pages deploy .vercel/output/static --project-name uptimeflare
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID || steps.fetch_account_id.outputs.account_id }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ steps.fetch_account_id.outputs.account_id }}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export default {
|
|||
state.overallDown = 0
|
||||
state.overallUp = 0
|
||||
|
||||
let statusChaged = false
|
||||
let statusChanged = false
|
||||
const currentTimeSecond = Math.round(Date.now() / 1000)
|
||||
|
||||
// Check each monitor
|
||||
|
|
@ -116,7 +116,7 @@ export default {
|
|||
// close existing incident if any
|
||||
if (lastIncident.end === undefined) {
|
||||
lastIncident.end = currentTimeSecond
|
||||
statusChaged = true
|
||||
statusChanged = true
|
||||
|
||||
try {
|
||||
await workerConfig.callbacks.onStatusChange(
|
||||
|
|
@ -141,7 +141,7 @@ export default {
|
|||
end: undefined,
|
||||
error: [status.err],
|
||||
})
|
||||
statusChaged = true
|
||||
statusChanged = true
|
||||
|
||||
try {
|
||||
await workerConfig.callbacks.onStatusChange(
|
||||
|
|
@ -163,7 +163,7 @@ export default {
|
|||
// append if the error message changes
|
||||
lastIncident.start.push(currentTimeSecond)
|
||||
lastIncident.error.push(status.err)
|
||||
statusChaged = true
|
||||
statusChanged = true
|
||||
|
||||
try {
|
||||
await workerConfig.callbacks.onStatusChange(
|
||||
|
|
|
|||
Loading…
Reference in New Issue