Skip to content

Commit

Permalink
chore: fix issue with schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonsfran1165 committed Jan 15, 2025
1 parent 276af75 commit a0a3f76
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ name: Clean up Preview Deployment
on:
pull_request:
types: [closed]
branches:
- '**'
- '!renovate/**'
- '!main'

jobs:
delete-preview:
runs-on: ubuntu-latest
if: "!contains(github.head_ref, 'renovate/') || !contains(github.head_ref, 'main')"
steps:
- uses: Infisical/[email protected]
with:
Expand Down
6 changes: 4 additions & 2 deletions internal/jobs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"with-env": "infisical run --env=preview --path=/app --",
"with-env-prod": "infisical run --env=prod --path=/ci --",
"dev:trigger": "pnpm with-env pnpm dlx [email protected] dev",
"deploy:trigger-prod": "npx [email protected] deploy"
"deploy:trigger-prod": "npx [email protected] deploy",
"delete": "pnpm tsx src/delete.ts"
},
"dependencies": {
"@infisical/sdk": "^3.0.4",
Expand All @@ -28,6 +29,7 @@
},
"devDependencies": {
"@unprice/tsconfig": "^0.1.0",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"tsx": "^4.7.2"
}
}
9 changes: 9 additions & 0 deletions internal/jobs/src/delete.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { schedules } from "@trigger.dev/sdk/v3"

import { configure } from "@trigger.dev/sdk/v3"

configure({
secretKey: process.env.TRIGGER_SECRET_KEY,
})

await schedules.del("sched_e9mhr3yzyiupkk7et27hg")
1 change: 1 addition & 0 deletions internal/jobs/src/trigger/schedules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export * from "./billing"
export * from "./end"
export * from "./end-trials"
export * from "./invoicing"
export * from "./renew"
1 change: 1 addition & 0 deletions internal/jobs/src/trigger/tasks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export * from "./change"
export * from "./end-trial"
export * from "./expire"
export * from "./invoice"
export * from "./pastdue"
export * from "./renew"
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a0a3f76

Please sign in to comment.