Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eashwar committed Feb 15, 2024
1 parent 4f0da8c commit 976b291
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/main_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- 'main'
workflow_dispatch

jobs:
build-and-deploy:
Expand All @@ -14,15 +15,20 @@ jobs:
with:
fetch-depth: 0
- name: '📝 Check if DB Schema was Changed'
env:
SHOULD_CHECK: ${{ github.event_name == 'push' }}
id: changed-files
run: |
git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep "prisma/"
if [ $? -eq 0 ]; then
echo "pushing db changes"
echo "PUSH_DB=true" >> "$GITHUB_OUTPUT"
else
echo "no db changes to push"
echo "PUSH_DB=false" >> "$GITHUB_OUTPUT"
if [ $GITHUB_EVENT_NAME == push ]; then
git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep "prisma/"
if [ $? -eq 0 ]; then
echo "pushing db changes"
echo "PUSH_DB=true" >> "$GITHUB_OUTPUT"
else
echo "no db changes to push"
echo "PUSH_DB=false" >> "$GITHUB_OUTPUT"
fi
fi
- name: '🔑 Authenticate With GCP'
id: auth
uses: 'google-github-actions/auth@v2'
Expand Down

0 comments on commit 976b291

Please sign in to comment.