Skip to content

Correctly use github workflow output #2895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/commit-sqlx-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest
outputs:
output1: $
need_pr: ${{ steps.sqlx_check.outputs.need_pr }}
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -55,11 +55,14 @@ jobs:
run: cargo sqlx migrate run --database-url $DOCSRS_DATABASE_URL

- name: Commit sqlx changes on master branch if any
id: sqlx_check
run: |
just sqlx-prepare
# If there are differences in the SQLX files, then we push them on the master branch
if git status --porcelain .sqlx ; then
echo "need_pr" >> "$GITHUB_OUTPUT"
echo "need_pr=1" >> "$GITHUB_OUTPUT"
else
echo "need_pr=0" >> "$GITHUB_OUTPUT"
fi

- name: Clean up the database
Expand All @@ -69,11 +72,9 @@ jobs:
if: ${{ github.event.pull_request.merged }}
needs: commit-sqlx-changes
runs-on: ubuntu-latest
env:
OUTPUT1:
steps:
- name: Open pull request
if: ${{ needs.commit-sqlx-changes.outputs.output1 == 'need_or' }}
if: ${{ needs.commit-sqlx-changes.outputs.need_pr == '1' }}
uses: peter-evans/create-pull-request@v7
with:
commit-message: Update SQLX files
Expand Down
Loading