This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
Merge branch 'SJ/feat-drh-logo-and-links-in-edge-ui' of https://githu… #12
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
name: Run Deno and Push Generated SQL | |
on: | |
push: | |
paths: | |
- 'service/diabetes-research-hub/*.sql.ts' | |
jobs: | |
run-deno: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Find and run Deno for SQL files | |
run: | | |
for file in service/diabetes-research-hub/*.sql.ts; do | |
output_file="${file%.sql.ts}.auto.sql" | |
deno run -A "$file" > "$output_file" | |
done | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add service/diabetes-research-hub/*.auto.sql | |
git commit -m "Auto-generated .sql files" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |