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 26
26
if : ${{ github.event.pull_request.merged }}
27
27
runs-on : ubuntu-latest
28
28
outputs :
29
- output1 : $
29
+ need_pr : ${{ steps.sqlx_check.outputs.need_pr }}
30
30
steps :
31
31
- uses : actions/checkout@v5
32
32
@@ -55,11 +55,14 @@ jobs:
55
55
run : cargo sqlx migrate run --database-url $DOCSRS_DATABASE_URL
56
56
57
57
- name : Commit sqlx changes on master branch if any
58
+ id : sqlx_check
58
59
run : |
59
60
just sqlx-prepare
60
61
# If there are differences in the SQLX files, then we push them on the master branch
61
62
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"
63
66
fi
64
67
65
68
- name : Clean up the database
69
72
if : ${{ github.event.pull_request.merged }}
70
73
needs : commit-sqlx-changes
71
74
runs-on : ubuntu-latest
72
- env :
73
- OUTPUT1 :
74
75
steps :
75
76
- name : Open pull request
76
- if : ${{ needs.commit-sqlx-changes.outputs.output1 == 'need_or ' }}
77
+ if : ${{ needs.commit-sqlx-changes.outputs.need_pr == '1 ' }}
77
78
uses : peter-evans/create-pull-request@v7
78
79
with :
79
80
commit-message : Update SQLX files
You can’t perform that action at this time.
0 commit comments