v0.11.9 #4
Workflow file for this run
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: release-docker | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| publish-docker: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| artifact-metadata: write | |
| id-token: write | |
| checks: read | |
| steps: | |
| - name: Wait for checks to succeed | |
| uses: poseidon/wait-for-status-checks@v0.6.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| interval: 5 | |
| ignore_pattern: publish* | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| id: setup-python | |
| uses: actions/setup-python@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Cache virtualenv | |
| id: cache-venv | |
| uses: actions/cache@v5 | |
| with: | |
| path: .venv | |
| # same as used in the ci workflow for reuse across workflows | |
| key: ${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-venv-${{ hashFiles('pyproject.toml') }} | |
| - if: steps.cache-venv.outputs.cache-hit != 'true' | |
| run: make install | |
| - name: Test Docker image | |
| run: uv run pytest integration_tests/test_docker.py | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/tekumara/fakesnow | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=raw,value=latest,enable=${{ !github.event.release.prerelease }} | |
| - name: Build and push Docker image | |
| id: push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| sbom: true | |
| provenance: true | |
| - name: Generate artifact attestation | |
| uses: actions/attest@v4 | |
| with: | |
| subject-name: ghcr.io/tekumara/fakesnow | |
| subject-digest: ${{ steps.push.outputs.digest }} | |
| push-to-registry: true |