-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub workflows for database migrations and configure Dependabot
- Loading branch information
1 parent
fd2f060
commit 1e26997
Showing
8 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
groups: | ||
all-updates: | ||
applies-to: version-updates | ||
patterns: | ||
- "*" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Database migration (production) | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'migrations/**' | ||
|
||
jobs: | ||
migration: | ||
runs-on: ubuntu-24.04 | ||
environment: production | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22.12.0' | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run database migration | ||
env: | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
run: npm run db:migrate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Database migration (staging) | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- 'migrations/**' | ||
|
||
jobs: | ||
migration: | ||
runs-on: ubuntu-24.04 | ||
environment: staging | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22.12.0' | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run database migration | ||
env: | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
run: npm run db:migrate | ||
- name: Seed database | ||
env: | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
run: npm run db:seed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters