-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import - Programmer sur Github Actions
- Programmé tous les jours à 18h10 UTC ou à la demande (mais en obligeant à n'en avoir qu'un seul qui tourne à la fois) - Adaptation pour qu'il aille chercher le dernier dump uploadé - Écrits les points clefs dans le job summary via `appendToGithubSummary` - Publie les CSV en tant qu'artefact - Remplacement de l'utilisation de `pg_secret_config.mjs` par des variables d'environnements qui viennent de secrets Github ref #893
- Loading branch information
Showing
9 changed files
with
131 additions
and
31 deletions.
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,37 @@ | ||
name: Sudocuh import | ||
on: | ||
schedule: | ||
- cron: '10 18 * * *' | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
|
||
jobs: | ||
import: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
|
||
- run: npm ci | ||
|
||
- env: | ||
PGPASSWORD: ${{ secrets.DEV_SUPABASE_PASSWORD }} | ||
DEV_SUPABASE_ADMIN_KEY: ${{ secrets.DEV_SUPABASE_ADMIN_KEY }} | ||
DEV_SUPABASE_PASSWORD: ${{ secrets.DEV_SUPABASE_PASSWORD }} | ||
PROD_SUPABASE_ADMIN_KEY: ${{ secrets.PROD_SUPABASE_ADMIN_KEY }} | ||
PROD_SUPABASE_PASSWORD: ${{ secrets.PROD_SUPABASE_PASSWORD }} | ||
run: npm run daily_dump | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: daily_dump/output |
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,4 @@ | ||
import { appendFileSync } from 'node:fs' | ||
export function appendToGithubSummary(markdown) { | ||
appendFileSync(process.env.GITHUB_STEP_SUMMARY, markdown) | ||
} |
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,16 @@ | ||
export default { | ||
PG_DEV_CONFIG: { | ||
env: 'dev', | ||
url: 'https://drncrjteathtblggsgxi.supabase.co', | ||
host: 'aws-0-eu-west-2.pooler.supabase.com', | ||
port: 5432, | ||
database: 'postgres' | ||
}, | ||
PG_PROD_CONFIG: { | ||
env: 'prod', | ||
url: 'https://ixxbyuandbmplfnqtxyw.supabase.co', | ||
host: 'aws-0-eu-central-1.pooler.supabase.com', | ||
port: 5432, | ||
database: 'postgres' | ||
} | ||
} |
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
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
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
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
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
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