Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

This PR adds functionality to the CI/CD pipeline to build and push Docker images for pull requests and pushes to the main branch.

google-labs-jules bot and others added 6 commits August 25, 2025 19:10
This commit enhances the CI/CD pipeline with the following features:

1.  When a pull request is created or updated, a Docker image is built
    and pushed to the container registry. The image is tagged with
    `pr-<prid>`, where `<prid>` is the pull request ID.

2.  When a commit is pushed to the `main` branch, a Docker image is
    built and pushed to the container registry. The image is tagged with
    `main`.

These changes provide continuous integration builds for pull requests and the main branch, allowing for better testing and deployment workflows.
The reusable test workflow was failing because the `sqlx` command was
not found. This was happening because the `~/.cargo/bin` directory, where
`cargo install` places binaries, was not in the system's `PATH`.

This commit fixes the issue by adding a step to the workflow that
appends `$HOME/.cargo/bin` to the `$GITHUB_PATH` environment file. This
ensures that `sqlx-cli` and other cargo-installed binaries are available
in subsequent steps.
The previous logic for installing `sqlx-cli` only ran when the cargo
cache was not hit. This caused pipeline failures when the cache was hit
but did not contain the `sqlx` binary.

This commit fixes the issue by removing the conditional execution of the
`cargo install sqlx-cli` step. The step will now run on every execution
of the workflow, ensuring that `sqlx-cli` is always available. Cargo
will efficiently handle cases where the binary is already installed.
This commit updates the reusable test workflow to use the
`rust:latest-slim` Docker image instead of `rust:1-slim`.

This ensures that the CI pipeline always uses the latest stable slim
version of the Rust toolchain, as requested.
@13hannes11 13hannes11 marked this pull request as ready for review August 25, 2025 21:15
@13hannes11 13hannes11 merged commit a3a8893 into main Aug 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants