-
Notifications
You must be signed in to change notification settings - Fork 694
CI Updates #536
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
CI Updates #536
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| name: Publish Docker image | ||
| description: Build and push the Docker image to Docker Hub | ||
| inputs: | ||
| docker_username: | ||
| required: true | ||
| description: Docker Hub username | ||
| docker_password: | ||
| required: true | ||
| description: Docker Hub password | ||
| image: | ||
| required: true | ||
| description: Docker image name (e.g. user/repo) | ||
| version: | ||
| required: false | ||
| default: "" | ||
| description: Optional version string (e.g. 1.2.3). If provided, tags are computed from this version instead of the GitHub ref. | ||
| include_branch_tags: | ||
| required: false | ||
| default: "true" | ||
| description: Whether to also publish a branch tag when running on a branch ref (e.g. manual runs). | ||
| context: | ||
| required: false | ||
| default: . | ||
| description: Docker build context | ||
| dockerfile: | ||
| required: false | ||
| default: Server/Dockerfile | ||
| description: Path to Dockerfile | ||
| platforms: | ||
| required: false | ||
| default: linux/amd64 | ||
| description: Target platforms | ||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Log in to Docker Hub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ inputs.docker_username }} | ||
| password: ${{ inputs.docker_password }} | ||
|
|
||
| - name: Extract metadata (tags, labels) for Docker | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| if: ${{ inputs.version == '' && inputs.include_branch_tags == 'true' }} | ||
| with: | ||
| images: ${{ inputs.image }} | ||
| tags: | | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| type=semver,pattern={{major}} | ||
| type=ref,event=branch | ||
|
|
||
| - name: Extract metadata (tags, labels) for Docker | ||
| id: meta_nobranch | ||
| uses: docker/metadata-action@v5 | ||
| if: ${{ inputs.version == '' && inputs.include_branch_tags != 'true' }} | ||
| with: | ||
| images: ${{ inputs.image }} | ||
| tags: | | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| type=semver,pattern={{major}} | ||
|
|
||
| - name: Compute Docker tags from version | ||
| id: version_tags | ||
| if: ${{ inputs.version != '' }} | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| IFS='.' read -r MA MI PA <<< "${{ inputs.version }}" | ||
| echo "major=$MA" >> "$GITHUB_OUTPUT" | ||
| echo "minor=$MI" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Extract metadata (tags, labels) for Docker | ||
| id: meta_version | ||
| uses: docker/metadata-action@v5 | ||
| if: ${{ inputs.version != '' && inputs.include_branch_tags == 'true' }} | ||
| with: | ||
| images: ${{ inputs.image }} | ||
| tags: | | ||
| type=raw,value=v${{ inputs.version }} | ||
| type=raw,value=v${{ steps.version_tags.outputs.major }}.${{ steps.version_tags.outputs.minor }} | ||
| type=raw,value=v${{ steps.version_tags.outputs.major }} | ||
| type=ref,event=branch | ||
|
|
||
| - name: Extract metadata (tags, labels) for Docker | ||
| id: meta_version_nobranch | ||
| uses: docker/metadata-action@v5 | ||
| if: ${{ inputs.version != '' && inputs.include_branch_tags != 'true' }} | ||
| with: | ||
| images: ${{ inputs.image }} | ||
| tags: | | ||
| type=raw,value=v${{ inputs.version }} | ||
| type=raw,value=v${{ steps.version_tags.outputs.major }}.${{ steps.version_tags.outputs.minor }} | ||
| type=raw,value=v${{ steps.version_tags.outputs.major }} | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: ${{ inputs.context }} | ||
| file: ${{ inputs.dockerfile }} | ||
| platforms: ${{ inputs.platforms }} | ||
| push: true | ||
| tags: ${{ steps.meta.outputs.tags || steps.meta_nobranch.outputs.tags || steps.meta_version.outputs.tags || steps.meta_version_nobranch.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels || steps.meta_nobranch.outputs.labels || steps.meta_version.outputs.labels || steps.meta_version_nobranch.outputs.labels }} | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: Publish Python distribution to PyPI | ||
| description: Build and publish the Python package from Server/ to PyPI | ||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| version: "latest" | ||
| enable-cache: true | ||
| cache-dependency-glob: "Server/uv.lock" | ||
|
|
||
| - name: Build a binary wheel and a source tarball | ||
| shell: bash | ||
| run: uv build | ||
| working-directory: ./Server | ||
|
|
||
| - name: Publish distribution to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| packages-dir: Server/dist/ | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
astral-sh setup-uv latest stable version best practices💡 Result:
Short answer
Best-practice checklist (concise)
Minimal example
uses: astral-sh/setup-uv@v7
with:
version: "0.9.21"
python-version: "3.12"
enable-cache: true
Sources
[1] astral-sh/setup-uv (GitHub README).
[2] Using uv in GitHub Actions — docs.astral.sh/uv/guides/integration/github.
[3] Using uv in Docker — docs.astral.sh/uv/guides/integration/docker.
🌐 Web query:
uv Python package manager latest stable release version 2025💡 Result:
The latest stable UV release in 2025 is version 0.9.21 (released Dec 30, 2025). [1][2]
Sources:
[1] PyPI — uv release history (uv‑0.9.21 uploaded Dec 30, 2025).
[2] GitHub — astral‑sh/uv releases (0.9.20 notes; repo releases list).
🌐 Web query:
astral-sh setup-uv action breaking changes version pinning recommendations💡 Result:
Short summary of recent breaking changes and pinning recommendations for astral-sh/setup-uv
Breaking changes to be aware of
Recommended version-pinning and workflow practices
Useful references
If you want, I can draft the minimal workflow snippet showing recommended pinning (action + uv version + python-version + assertion).
Pin
uvto a specific version (e.g.,0.9.21) instead of"latest"for reproducibility.Using
version: "latest"can lead to unexpected build failures when uv releases introduce breaking changes. Recent versions have introduced breaking behavior (e.g., uv 0.9.x changed the default Python version to 3.14). Pin to an exact version likeversion: "0.9.21"to ensure consistent and predictable builds, aligning with your stability requirements.🤖 Prompt for AI Agents