Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Update update-be-new-migration-latest-timestamp.yml
Maidul Islam63a79410472b
diff --git a/.github/workflows/update-be-new-migration-latest-timestamp.yml b/.github/workflows/update-be-new-migration-latest-timestamp.ymlindex 5636f890ad..160828473e 100644--- a/.github/workflows/update-be-new-migration-latest-timestamp.yml+++ b/.github/workflows/update-be-new-migration-latest-timestamp.yml@@ -2,8 +2,7 @@ name: Rename Migrationson:pull_request:- types:- - closed+ types: [closed]paths:- 'backend/src/db/migrations/**'@@ -11,30 +10,39 @@ jobs:rename:runs-on: ubuntu-latestif: github.event.pull_request.merged == true+steps:- name: Check out repositoryuses: actions/checkout@v4with:fetch-depth: 0-+- name: Get list of newly added files in migration folder- run: git diff --name-status HEAD^ HEAD backend/src/db/migrations | grep '^A' | cut -f2 | xargs -n1 basename > added_files.txt-- - name: Script to rename migrations+ run: |+ git diff --name-status HEAD^ HEAD backend/src/db/migrations | grep '^A' | cut -f2 | xargs -n1 basename > added_files.txt+ if [ ! -s added_files.txt ]; then+ echo "No new files added. Skipping"+ echo "SKIP_RENAME=true" >> $GITHUB_ENV+ fi++ - name: Script to rename migrations+ if: env.SKIP_RENAME != 'true'run: python .github/resources/rename_migration_files.py- name: Commit and push changes+ if: env.SKIP_RENAME != 'true'run: |git config user.name github-actionsgit config user.email [email protected]git add ./backend/src/db/migrationsrm added_files.txtgit commit -m "chore: renamed new migration files to latest timestamp (gh-action)"-+- name: Create Pull Request+ if: env.SKIP_RENAME != 'true'uses: peter-evans/create-pull-request@v6with:token: ${{ secrets.GITHUB_TOKEN }}- commit-message: 'chore: renamed new migration files to latest UTC(gh-action)'+ commit-message: 'chore: renamed new migration files to latest UTC (gh-action)'title: 'GH Action: rename new migration file timestamp'branch-suffix: timestamp