Skip to content

Fix SQL CI task #2866

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
Jul 17, 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
15 changes: 7 additions & 8 deletions .github/workflows/commit-sqlx-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permissions:
contents: write

jobs:
update-labels:
commit-sqlx-changes:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest
steps:
Expand All @@ -35,13 +35,7 @@ jobs:
with:
prefix-key: ${{ env.RUST_CACHE_KEY }}

- name: install SQLX CLI
run: cargo install sqlx-cli --no-default-features --features postgres

- name: run database migrations
run: cargo sqlx migrate run --database-url $DOCSRS_DATABASE_URL

- name: Commit sqlx changes on master branch if any
- name: Launch postgres
run: |
cp .env.sample .env
mkdir -p ${DOCSRS_PREFIX}/public-html
Expand All @@ -51,6 +45,11 @@ jobs:
# Make sure the database is actually working
psql "${DOCSRS_DATABASE_URL}"

- name: install SQLX CLI
run: cargo install sqlx-cli --no-default-features --features postgres

- name: Commit sqlx changes on master branch if any
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
Expand Down
Loading