1515
1616 # Repository Secrets - Create these in Project Settings > Secrets > Actions
1717 TOKEN : ${{ secrets.FLYWAY_TOKEN }}
18- DB_USER_Build : ${{ secrets.DB_USER_NAME_QA }}
19- DB_USER_PW_Build : ${{ secrets.DB_USER_PW_QA }}
18+ DB_USER_BUILD : ${{ secrets.DB_USER_NAME_BUILD }}
19+ DB_USER_PW_BUILD : ${{ secrets.DB_USER_PW_BUILD }}
2020 FIRST_UNDO_SCRIPT : ${{ secrets.FIRST_UNDO_SCRIPT }} # Validates all undo scripts up to and including the specified script
2121
2222# jobs are the steps executed in the workflow
2626 # runs-on: ubuntu-latest
2727 defaults :
2828 run :
29- shell : cmd # Default shell. Use Windows Command Prompt
29+ shell : cmd # Default shell. Use Windows Command Prompt. bash for linux.
3030 steps : # Steps are the individual tasks that are executed in the job
3131 - name : Checkout Repository # Step to check out the repository
3232 uses : actions/checkout@v4
@@ -38,13 +38,13 @@ jobs:
3838 # Runs the Flyway Clean command against the Build database
3939 - name : Clean Build DB
4040 run : |
41- flyway -email=${{ env.EMAIL }} -token=${{ env.TOKEN }} info clean info -cleanDisabled="false" -user=${{ env.DB_USER_Build }} -password=${{ env.DB_USER_PW_Build }} -url=${{ env.JDBC_BUILD }} -IAgreeToTheEula -locations="filesystem:${{ github.workspace }}/migrations" -configFiles="${{ github.workspace }}/flyway.toml" -baselineOnMigrate=true -errorOverrides=S0001:0:I-
41+ flyway -email=${{ env.EMAIL }} -token=${{ env.TOKEN }} info clean info -cleanDisabled="false" -user=${{ env.DB_USER_BUILD }} -password=${{ env.DB_USER_PW_BUILD }} -url=${{ env.JDBC_BUILD }} -IAgreeToTheEula -locations="filesystem:${{ github.workspace }}/migrations" -configFiles="${{ github.workspace }}/flyway.toml" -baselineOnMigrate=true -errorOverrides=S0001:0:I-
4242
4343 - name : Migrate Build # Step to run Flyway migrations
4444 # To use username and password instead of windows integrated security Ensure that SQL Server is configured to allow SQL Server authentication. You can check this in SQL Server Management Studio (SSMS) under the server properties -> Security -> Server authentication. Ensure "SQL Server and Windows Authentication mode" is selected.
45- run : flyway -email=${{ env.EMAIL }} -token=${{ env.TOKEN }} migrate -cleanDisabled="false" -user=${{ env.DB_USER_Build }} -password=${{ env.DB_USER_PW_Build }} -url=${{ env.JDBC_BUILD }} -IAgreeToTheEula -locations="filesystem:${{ github.workspace }}/migrations" -configFiles="${{ github.workspace }}/flyway.toml" -baselineOnMigrate=true -errorOverrides=S0001:0:I-
45+ run : flyway -email=${{ env.EMAIL }} -token=${{ env.TOKEN }} migrate -cleanDisabled="false" -user=${{ env.DB_USER_BUILD }} -password=${{ env.DB_USER_PW_BUILD }} -url=${{ env.JDBC_BUILD }} -IAgreeToTheEula -locations="filesystem:${{ github.workspace }}/migrations" -configFiles="${{ github.workspace }}/flyway.toml" -baselineOnMigrate=true -errorOverrides=S0001:0:I-
4646 working-directory : ./migrations
4747
4848 - name : Rollback Build # Step to run Flyway migrations
49- run : flyway -email=${{ env.EMAIL }} -token=${{ env.TOKEN }} undo -cleanDisabled="false" -user=${{ env.DB_USER_Build }} -password=${{ env.DB_USER_PW_Build }} -url=${{ env.JDBC_BUILD }} -target=${{ env.FIRST_UNDO_SCRIPT }} -IAgreeToTheEula -locations="filesystem:${{ github.workspace }}/migrations" -configFiles="${{ github.workspace }}/flyway.toml" -baselineOnMigrate=true -errorOverrides=S0001:0:I-
49+ run : flyway -email=${{ env.EMAIL }} -token=${{ env.TOKEN }} undo -cleanDisabled="false" -user=${{ env.DB_USER_BUILD }} -password=${{ env.DB_USER_PW_BUILD }} -url=${{ env.JDBC_BUILD }} -target=${{ env.FIRST_UNDO_SCRIPT }} -IAgreeToTheEula -locations="filesystem:${{ github.workspace }}/migrations" -configFiles="${{ github.workspace }}/flyway.toml" -baselineOnMigrate=true -errorOverrides=S0001:0:I-
5050 working-directory : ./migrations
0 commit comments