added python 3.14 #24
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
| name: Python 3.13 Rust | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| # Publish semver tags as releases. | |
| tags: [ 'v*.*.*' ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| # Use docker.io for Docker Hub if empty | |
| REGISTRY: ghcr.io | |
| jobs: | |
| # Build job for py313_rust image | |
| build-py313-rust: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - linux/amd64 | |
| - linux/arm64 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Inject slug/short variables | |
| uses: rlespinasse/[email protected] | |
| - name: Prepare | |
| run: | | |
| platform=${{ matrix.platform }} | |
| echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV | |
| # Install the cosign tool except on PR | |
| - name: Install cosign | |
| if: github.event_name != 'pull_request' | |
| uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1 | |
| with: | |
| cosign-release: 'v2.1.1' | |
| # Set up QEMU for cross-platform builds | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| # Set up BuildKit Docker container builder | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| # Login against a Docker registry except on PR | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push by digest | |
| id: build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| provenance: false | |
| sbom: false | |
| file: docker/Dockerfile.py313_rust | |
| platforms: ${{ matrix.platform }} | |
| tags: ghcr.io/insight-platform/py313_rust | |
| outputs: type=image,push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }} | |
| context: . | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Export digest | |
| run: | | |
| mkdir -p ${{ runner.temp }}/digests-py313rust | |
| digest="${{ steps.build.outputs.digest }}" | |
| touch "${{ runner.temp }}/digests-py313rust/${digest#sha256:}" | |
| - name: Upload digest | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: digests-py313rust-${{ env.PLATFORM_PAIR }} | |
| path: ${{ runner.temp }}/digests-py313rust/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| # Merge job for py313_rust image | |
| merge-py313-rust: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-py313-rust | |
| if: github.event_name != 'pull_request' | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Inject slug/short variables | |
| uses: rlespinasse/[email protected] | |
| - name: Download digests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ${{ runner.temp }}/digests-py313rust | |
| pattern: digests-py313rust-* | |
| merge-multiple: true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create manifest list and push | |
| working-directory: ${{ runner.temp }}/digests-py313rust | |
| run: | | |
| docker buildx imagetools create \ | |
| -t ghcr.io/insight-platform/py313_rust:${{ env.GITHUB_REF_SLUG }} \ | |
| $(printf 'ghcr.io/insight-platform/py313_rust@sha256:%s ' *) | |
| - name: Inspect image | |
| run: | | |
| docker buildx imagetools inspect ghcr.io/insight-platform/py313_rust:${{ env.GITHUB_REF_SLUG }} |