File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 2626 if : ${{ github.event.pull_request.merged }}
2727 runs-on : ubuntu-latest
2828 outputs :
29- output1 : $
29+ need_pr : ${{ steps.sqlx_check.outputs.need_pr }}
3030 steps :
3131 - uses : actions/checkout@v5
3232
@@ -55,11 +55,14 @@ jobs:
5555 run : cargo sqlx migrate run --database-url $DOCSRS_DATABASE_URL
5656
5757 - name : Commit sqlx changes on master branch if any
58+ id : sqlx_check
5859 run : |
5960 just sqlx-prepare
6061 # If there are differences in the SQLX files, then we push them on the master branch
6162 if git status --porcelain .sqlx ; then
62- echo "need_pr" >> "$GITHUB_OUTPUT"
63+ echo "need_pr=1" >> "$GITHUB_OUTPUT"
64+ else
65+ echo "need_pr=0" >> "$GITHUB_OUTPUT"
6366 fi
6467
6568 - name : Clean up the database
6972 if : ${{ github.event.pull_request.merged }}
7073 needs : commit-sqlx-changes
7174 runs-on : ubuntu-latest
72- env :
73- OUTPUT1 :
7475 steps :
7576 - name : Open pull request
76- if : ${{ needs.commit-sqlx-changes.outputs.output1 == 'need_or ' }}
77+ if : ${{ needs.commit-sqlx-changes.outputs.need_pr == '1 ' }}
7778 uses : peter-evans/create-pull-request@v7
7879 with :
7980 commit-message : Update SQLX files
You can’t perform that action at this time.
0 commit comments