Skip to content

96 create GitHub actions sync type script definitions with database#108

Open
mehanana wants to merge 4 commits intomainfrom
96-Create-Github-Actions-Sync-TypeScript-Definitions-With-Database
Open

96 create GitHub actions sync type script definitions with database#108
mehanana wants to merge 4 commits intomainfrom
96-Create-Github-Actions-Sync-TypeScript-Definitions-With-Database

Conversation

@mehanana
Copy link
Contributor

@mehanana mehanana commented Jan 29, 2026

ℹ️ Issue

Closes

📝 Description

Created a Github actions workflow that automatically updates the typescript definitions if there's any database schema changes. This occurs on pull requests when database related files are modified and uses kysely to regenerate the datatypes and copies it to db-types.d.ts in each of the lambdas.

Briefly list the changes made to the code:

  1. Created new github action yaml

✔️ Verification

What steps did you take to verify your changes work? These should be clear enough for someone to be able to clone the branch and follow the steps themselves.

Provide screenshots of any new components, styling changes, or pages.
Used act to run the workflow in my command prompt to ensure it worked
image

🏕️ (Optional) Future Work / Notes

I want to make sure the workflow output is clear, so if you think there should be echo commands in certain places or if the summary needs more information, let me know!

@mehanana mehanana marked this pull request as ready for review February 6, 2026 00:24
Copy link
Collaborator

@nourshoreibah nourshoreibah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment about commit race conditions. Assuming you tested and this works, LGTM!

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Commit and push changes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing to be careful of here: Since we have many CI things that push changes, we need to be careful of race conditions. We should ideally have one bot that manages all the commiting/pushing, but for now, can you make the Terraform readme workflow wait for this one? (Thillai has a PR up for another workflow that waits for the terraform one)

Copy link
Collaborator

@nourshoreibah nourshoreibah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants