Skip to content

feat: create bash script to automate infisical secrets retrieval - #119

Merged
AlexanderWangY merged 3 commits into
devfrom
stanley/infra-fix
Oct 2, 2025
Merged

feat: create bash script to automate infisical secrets retrieval#119
AlexanderWangY merged 3 commits into
devfrom
stanley/infra-fix

Conversation

@SobaSkee

@SobaSkee SobaSkee commented Oct 2, 2025

Copy link
Copy Markdown
Collaborator

Description

Edited the GItHub workflow file for web to development. Specifically added env command to get the infisical client id and client secrets from github secrets that I added. Then it runs a bash script with client id and secret to run various commands. First it obtains ACCESS_TOKEN, then it calls the Infisical API to retrieve all secrets in dev/web and using jq to filter for just the secretKey and secretValue fields. Finally the output of this is sent to .env.dev.web file. The end.

Linked Jira Ticket

Link Jira ticket here. TECH-215

Type of Change

Checklist

  • [X ] My code follows the project's style guidelines
  • [ X] I have commented on complex parts of the code
  • [ X] I have updated documentation if necessary
  • [ X] I have updated or added tests to cover my changes
  • [ X] I have updated the OpenAPI YAML or other API schema files if applicable

Additional Notes

image image

infisical export --env=dev --format=dotenv --path="/web" --projectId=${{ secrets.INFISICAL_PROJECT_ID }} > ./secrets/.env.dev.web

# export secrets into .env files
./fetch-web-secrets.sh

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You may need to sudo chmod +x ./fetch-web-secrets.sh before running to give it proper execution permission.

@AlexanderWangY
AlexanderWangY merged commit 0b9ba9b into dev Oct 2, 2025
2 checks passed
@h1divp

h1divp commented Oct 3, 2025

Copy link
Copy Markdown
Member

Small nitpick here but please do not be posting screenshots of code... unless if there was some important reason we can already see these changes in the Files Changed tab

@h1divp

h1divp commented Oct 3, 2025

Copy link
Copy Markdown
Member

As a general practice nearly everywhere please use codeblocks over screenshots

AlexanderWangY added a commit that referenced this pull request Oct 5, 2025
* feat: form autosaving, submission, and tweaks to form fields (#98)

* feat: form autosaving, submission, and tweaks to form fields

* feat: storage interface + r2 implementation

* chore: added error boundary for application forms

* chore: added success and error submission message and some optimizations

* chore: added regex validation and invalid application state

* chore: removed resume_url column

* chore: removed useless env variables

* chore: refactored application submission handlers, services and repository

* chore: changed submission status for db, updated loading state and error response for submission

* chore: minor changes and created migration to update `saved_at` column

* chore: cleanup and small changes

* chore: change save delay to 3 seconnds instead of 1

* chore: removed testing code

* chore: added requested changes from alex

* chore: refactor frontend

* chore: ensure application is published

* refactor(applications): move application open function to event service and shortened

* fix(portal): upcoming and application past button states and card states

* fix(roles): add applicant role AFTER submission

* refactor(application): rewrote some response values for application json

---------

Co-authored-by: AlexanderWangY <alexander.yisu.wang@outlook.com>

* Rate limiting for /interest (#105)

* Added Introduction Modal (#106)

* Added Modal with new handler/service

* PR Suggestions

* Transition to Tanstack forms

* fix(onboard): fix styling and update route

---------

Co-authored-by: Alexander Wang <alexander.yisu.wang@outlook.com>
Co-authored-by: Alexander Wang <98280966+AlexanderWangY@users.noreply.github.com>

* Refactor err == into errors.is (#108)

* hotfix(lint): remove unused imports for build

* feat: configured dev-web workflow

* fix: removed need

* fix: specified dev dockerfile

* feat: added settings page, routes refactor and other styling changes (#110)

* chore: refactored routes and moved profile card to bottom left

* feat: added switch component

* feat: added settings page and style adjustments for input fields

* feat: added email consent column migration

* chore: update user info in sessions and added email_consent in updateUser

* removed settings route

* chore: style tweaks

* feat: added routes to update user settings and email consent

* feat: created settings page component

* chore: added toggle settings and log out

* chore: fixed types and added settings + logout in appshell

* chore: update background and surface

* chore: regenerate sqlc files

* remove useless comment

* chore: refactor

* chore: added Menu component

* chore: moved profile to top right in mobile view and small styling changes

* feat: real pfp + logout changes

---------

Co-authored-by: Alexander Wang <alexander.yisu.wang@outlook.com>

* Event configuration page for event admins (#112)

* feat: event settings page and form

* feat: add banner to event update query

* feat: form submission and type checks + refactor, goodnight!

* feat: upload banner api temporary

* feat: banner upload and deletion complete

* fix: message and deferrence closer

* chore: added link to user/admin portal (#114)

* chore: added link to user/admin portal

* feat: colors!

---------

Co-authored-by: AlexanderWangY <alexander.yisu.wang@outlook.com>

* feature: added openapi generation from `swag` code comments (#113)

* feat: openapi generation using swag

* chore: update openapi documentation for handlers

* chore: update names and generate files

* chore: updated web schema

* chore: update types and fix mismatches

---------

Co-authored-by: AlexanderWangY <alexander.yisu.wang@outlook.com>

* added link to portal in logo and added page under construction component (#116)

* Fixes (#117)

* feat: create bash script to automate infisical secrets retrieval

* Staff Management Page feature (#115)

* feat: new staff management page outline

* fix: add staff user type

* fix: weird golang sqlc types

* chore: refactor types and add staff modal

* feat: deleting staff users

* chore: use memo deps

* fix: web dockerfile + go versioning for air (#120)

* fix: change types for building (#121)

* fix: run chmod to ensure command runs as super user

* feat: create bash script to automate infisical secrets retrieval (#119)

* feat: create bash script to automate infisical secrets retrieval

* fix: run chmod to ensure command runs as super user

* fix: add docker dev file to web

* feat(CI/CD): Deploy dev and prod web servers to digital ocean (#123)

* feat: moved Caddyfiles to dedicated infra folder

* feat(CI/CD): deployment workflows refactored to reflect new deployment

* Feat/deploy web (#125)

* feat: moved Caddyfiles to dedicated infra folder

* feat(CI/CD): deployment workflows refactored to reflect new deployment

* fix(CI/CD): remove arch build to match versioning

* Feat/deploy web (#126)

* feat: moved Caddyfiles to dedicated infra folder

* feat(CI/CD): deployment workflows refactored to reflect new deployment

* fix(CI/CD): remove arch build to match versioning

* fix(CI/CD): build failing due to typescript route errors

---------

Co-authored-by: Hieu Nguyen <76720778+hieunguyent12@users.noreply.github.com>
Co-authored-by: Hugo Liu <98724522+hugoliu-code@users.noreply.github.com>
Co-authored-by: h1divp <71522316+h1divp@users.noreply.github.com>
Co-authored-by: Stanley Ke <kestanley101@gmail.com>
Co-authored-by: Stanley Ke <117794857+SobaSkee@users.noreply.github.com>
AlexanderWangY added a commit that referenced this pull request Oct 5, 2025
* feat: form autosaving, submission, and tweaks to form fields (#98)

* feat: form autosaving, submission, and tweaks to form fields

* feat: storage interface + r2 implementation

* chore: added error boundary for application forms

* chore: added success and error submission message and some optimizations

* chore: added regex validation and invalid application state

* chore: removed resume_url column

* chore: removed useless env variables

* chore: refactored application submission handlers, services and repository

* chore: changed submission status for db, updated loading state and error response for submission

* chore: minor changes and created migration to update `saved_at` column

* chore: cleanup and small changes

* chore: change save delay to 3 seconnds instead of 1

* chore: removed testing code

* chore: added requested changes from alex

* chore: refactor frontend

* chore: ensure application is published

* refactor(applications): move application open function to event service and shortened

* fix(portal): upcoming and application past button states and card states

* fix(roles): add applicant role AFTER submission

* refactor(application): rewrote some response values for application json

---------

Co-authored-by: AlexanderWangY <alexander.yisu.wang@outlook.com>

* Rate limiting for /interest (#105)

* Added Introduction Modal (#106)

* Added Modal with new handler/service

* PR Suggestions

* Transition to Tanstack forms

* fix(onboard): fix styling and update route

---------

Co-authored-by: Alexander Wang <alexander.yisu.wang@outlook.com>
Co-authored-by: Alexander Wang <98280966+AlexanderWangY@users.noreply.github.com>

* Refactor err == into errors.is (#108)

* hotfix(lint): remove unused imports for build

* feat: configured dev-web workflow

* fix: removed need

* fix: specified dev dockerfile

* feat: added settings page, routes refactor and other styling changes (#110)

* chore: refactored routes and moved profile card to bottom left

* feat: added switch component

* feat: added settings page and style adjustments for input fields

* feat: added email consent column migration

* chore: update user info in sessions and added email_consent in updateUser

* removed settings route

* chore: style tweaks

* feat: added routes to update user settings and email consent

* feat: created settings page component

* chore: added toggle settings and log out

* chore: fixed types and added settings + logout in appshell

* chore: update background and surface

* chore: regenerate sqlc files

* remove useless comment

* chore: refactor

* chore: added Menu component

* chore: moved profile to top right in mobile view and small styling changes

* feat: real pfp + logout changes

---------

Co-authored-by: Alexander Wang <alexander.yisu.wang@outlook.com>

* Event configuration page for event admins (#112)

* feat: event settings page and form

* feat: add banner to event update query

* feat: form submission and type checks + refactor, goodnight!

* feat: upload banner api temporary

* feat: banner upload and deletion complete

* fix: message and deferrence closer

* chore: added link to user/admin portal (#114)

* chore: added link to user/admin portal

* feat: colors!

---------

Co-authored-by: AlexanderWangY <alexander.yisu.wang@outlook.com>

* feature: added openapi generation from `swag` code comments (#113)

* feat: openapi generation using swag

* chore: update openapi documentation for handlers

* chore: update names and generate files

* chore: updated web schema

* chore: update types and fix mismatches

---------

Co-authored-by: AlexanderWangY <alexander.yisu.wang@outlook.com>

* added link to portal in logo and added page under construction component (#116)

* Fixes (#117)

* feat: create bash script to automate infisical secrets retrieval

* Staff Management Page feature (#115)

* feat: new staff management page outline

* fix: add staff user type

* fix: weird golang sqlc types

* chore: refactor types and add staff modal

* feat: deleting staff users

* chore: use memo deps

* fix: web dockerfile + go versioning for air (#120)

* fix: change types for building (#121)

* fix: run chmod to ensure command runs as super user

* feat: create bash script to automate infisical secrets retrieval (#119)

* feat: create bash script to automate infisical secrets retrieval

* fix: run chmod to ensure command runs as super user

* fix: add docker dev file to web

* feat(CI/CD): Deploy dev and prod web servers to digital ocean (#123)

* feat: moved Caddyfiles to dedicated infra folder

* feat(CI/CD): deployment workflows refactored to reflect new deployment

* Feat/deploy web (#125)

* feat: moved Caddyfiles to dedicated infra folder

* feat(CI/CD): deployment workflows refactored to reflect new deployment

* fix(CI/CD): remove arch build to match versioning

* Feat/deploy web (#126)

* feat: moved Caddyfiles to dedicated infra folder

* feat(CI/CD): deployment workflows refactored to reflect new deployment

* fix(CI/CD): remove arch build to match versioning

* fix(CI/CD): build failing due to typescript route errors

* hotfix: prod workflow targeted branch from main -> master

---------

Co-authored-by: Hieu Nguyen <76720778+hieunguyent12@users.noreply.github.com>
Co-authored-by: Hugo Liu <98724522+hugoliu-code@users.noreply.github.com>
Co-authored-by: h1divp <71522316+h1divp@users.noreply.github.com>
Co-authored-by: Stanley Ke <kestanley101@gmail.com>
Co-authored-by: Stanley Ke <117794857+SobaSkee@users.noreply.github.com>
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.

3 participants