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 Oct 31, 2023
1 parent b3940d4 commit 0e3ec4b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/capture_new_migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,18 @@ jobs:
number2=${{ env.FIRST_QUERY }}
diff=$((number1 - number2))
data=$(mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select app, name from django_migrations ORDER by -id limit $diff;" edxapp;)
formatted_data=$(echo "$data" | tr '\t' ' ')
echo "Query Result: $formatted_data"
echo "CUSTOM_MESSAGE=$formatted_data" >> $GITHUB_ENV
# formatted_data=$(echo "$data" | tr '\t' ' ')
# echo "Query Result: $formatted_data"
echo "$data" > multi_line_data.txt
echo "::set-env name=MULTI_LINE_DATA_PATH::multi_line_data.txt"
# echo "CUSTOM_MESSAGE=$formatted_data" >> $GITHUB_ENV
shell: bash

- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
message: |
${{ steps.process-data.outputs.formatted_data }}
${{ env.MULTI_LINE_DATA_PATH}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# This job aggregates test results. It's the required check for branch protection.
Expand Down

0 comments on commit 0e3ec4b

Please sign in to comment.