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 584aa4e commit df32bc1
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions .github/workflows/capture_new_migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
pip check # fail if this test-reqs/Django combination is broken
fi
- name: Run Tests
- name: Run migrations on master branch
env:
LMS_CFG: lms/envs/minimal.yml
# This is from the LMS dir on purpose since we don't need anything different for the CMS yet.
Expand All @@ -119,23 +119,6 @@ jobs:
# echo "Running the CMS migrations."
# ./manage.py cms migrate

# - name: "Setup env vars"
# id: envvars
# run: |
# number1=10
# number2=5
# echo "Number 1: $number1"
# echo "Number 2: $number2"
# result=$((number1 - number2))
# echo "Result: $result"
# echo "SUBTRACTION_RESULT=$result" >> $GITHUB_ENV
# shell: bash
#
# - name: Use subtraction result
# run: |
# subtraction_result=${{ env.SUBTRACTION_RESULT }}
# echo "Subtraction Result: $subtraction_result"

- name: Verify executed migrations on master.
id: capture1
shell: bash
Expand Down Expand Up @@ -193,13 +176,15 @@ 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 "CUSTOM_MESSAGE=$formatted_data" >> $GITHUB_ENV
# formatted_data=$(echo "$data" | tr '\t' ' ')
echo "$data" > multi_line_data.txt
echo "echo $data"
# echo "CUSTOM_MESSAGE=$formatted_data" >> $GITHUB_ENV
# echo "$formatted_data" > multi_line_data.txt
shell: bash
#
# - name: Comment PR
# uses: thollander/actions-comment-pull-request@v2
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
# filePath: multi_line_data.txt
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit df32bc1

Please sign in to comment.