Skip to content

Commit

Permalink
Store the schemaspy for a given version in a version specific subdire…
Browse files Browse the repository at this point in the history
…ctory
  • Loading branch information
kylemhall committed Apr 30, 2024
1 parent e2f7d76 commit 50b2d5f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,20 @@ jobs:
run: docker exec -i mydb sh -c 'exec mariadb -uroot -ppassword aspen' < aspen.sql
- name: Path to build dir
run: realpath build
- name: Move to the new directory
run: cd ${{ steps.extracted_variables.outputs.ASPEN_DEFAULT_BRANCH }}
- name: Create the version directory if it does not exist
run: [ -d ${{ steps.extracted_variables.outputs.ASPEN_DEFAULT_BRANCH }} ] || mkdir ${{ steps.extracted_variables.outputs.ASPEN_DEFAULT_BRANCH }}
- name: Execute schemaspy
run: docker run -u $(id -u ${USER}):$(id -g ${USER}) --network aspen-net -v $(realpath build):/output schemaspy/schemaspy:latest -t mariadb -db aspen -host mydb -port 3306 -u root -p password -s aspen
run: docker run -u $(id -u ${USER}):$(id -g ${USER}) --network aspen-net -v $(realpath .)/${{ steps.extracted_variables.outputs.ASPEN_DEFAULT_BRANCH }}:/output schemaspy/schemaspy:latest -t mariadb -db aspen -host mydb -port 3306 -u root -p password -s aspen

- name: Commit files
run: |
cd build
git config --local user.email "kyle@bywatersolutions.com"
git config --local user.name "Kyle M Hall"
git add .
git commit -m "Add changes" -a
git add ${{ steps.extracted_variables.outputs.ASPEN_DEFAULT_BRANCH }}
git commit -m "Add changes for ${{ steps.extracted_variables.outputs.ASPEN_DEFAULT_BRANCH }}" -a
cd ..
- name: Push changes
Expand Down

0 comments on commit 50b2d5f

Please sign in to comment.