Skip to content

Commit

Permalink
ci: update workflow for trigger qualityfolio pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhin077 authored Jan 27, 2025
1 parent ab82743 commit d86eb42
Showing 1 changed file with 7 additions and 28 deletions.
35 changes: 7 additions & 28 deletions .github/workflows/auto-generate-sql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: v2.x

- name: Install surveilr
run: |
curl -sSL https://zyedidia.github.io/eget.sh | bash
sudo mv ./eget /usr/local/bin/
eget opsfolio/releases.opsfolio.com
sudo mv surveilr /usr/local/bin/
surveilr --version
- name: Find and run Deno for SQL files
run: |
for file in lib/service/qualityfolio/*.sql.ts; do
output_file="${file%.sql.ts}.auto.sql"
deno run -A "$file" > "$output_file"
done
- name: Commit and push changes
- name: Trigger qualityfolio workflow
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add lib/service/qualityfolio/*.auto.sql
git commit -m "ci: generate .auto.sql from .sql.ts files"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/var.OWNER/var.REPO/actions/workflows/var.WORKFLOW_ID/dispatches \
-d '{"ref":"main"}'

0 comments on commit d86eb42

Please sign in to comment.