From 163f25a5069494fa8d1c9abc0a7c687fe2582ff2 Mon Sep 17 00:00:00 2001 From: shio <85730998+dino3616@users.noreply.github.com> Date: Sun, 29 Oct 2023 00:29:33 +0900 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=A6=BA=20(db-push-migration)=20migr?= =?UTF-8?q?ation=20=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92=20commit?= =?UTF-8?q?=20=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/db-push-migration.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/db-push-migration.yaml b/.github/workflows/db-push-migration.yaml index 185679d..e6d91d8 100644 --- a/.github/workflows/db-push-migration.yaml +++ b/.github/workflows/db-push-migration.yaml @@ -103,6 +103,19 @@ jobs: - name: push migration file to remote db run: pnpm supabase db push + - name: commit migration file + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + if git diff --name-only | grep -q "supabase/migrations/.*.sql"; then \ + git add ./; \ + git commit -m "actions: 🤖 (supabase) updated migration file"; \ + git push origin HEAD:${GITHUB_REF} --force; \ + echo "Committed changes to migration history"; \ + else \ + echo "No changes detected in migration history"; \ + fi + db-push-migration-check: runs-on: ubuntu-latest needs: push