Skip to content

Commit

Permalink
build: capturing new migrations.
Browse files Browse the repository at this point in the history
  • Loading branch information
awais786 committed Nov 1, 2023
1 parent a42792a commit 764e010
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/capture_new_migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,21 +172,14 @@ jobs:
- name: Process Data
run: |
number2=${{ env.SECOND_QUERY }}
number1=${{ env.FIRST_QUERY }}
if [ $number2 -gt $number1 ]; then
diff=$((number2 - number1))
data=$(mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select name from django_migrations ORDER by -id limit $diff;" edxapp;)
echo "$data" > cleaned_data.txt
elif [ $number1 -gt $number2 ]; then
echo "Your PR removed some migrations" > cleaned_data.txt
fi
number1=${{ env.SECOND_QUERY }}
number2=${{ env.FIRST_QUERY }}
diff=$((number1 - number2))
data=$(mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select name from django_migrations ORDER by -id limit $diff;" edxapp;)
echo "$data" > cleaned_data.txt
shell: bash

- name: Comment PR
number2=${{ env.SECOND_QUERY }}
number1=${{ env.FIRST_QUERY }}
uses: thollander/actions-comment-pull-request@v2
with:
filePath: cleaned_data.txt
Expand Down

0 comments on commit 764e010

Please sign in to comment.