chore: explain weightwatcher patches and bump pyproject minimums #54
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: Create and publish a Docker image | |
| on: [push, workflow_dispatch] | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| BRANCH: ${{ github.ref }} | |
| jobs: | |
| build-and-push-image: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver-opts: network=host | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| - name: Build and export to Docker | |
| uses: docker/build-push-action@v6 | |
| with: | |
| load: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| # Smoke-test the binaries baked into the image. Catches the class of | |
| # regression where the image builds but a runtime tool (sextractor, | |
| # weightwatcher) is missing or unrunnable on the deployment target. | |
| - name: Test — binaries | |
| run: | | |
| IMAGE=$(echo "${{ steps.meta.outputs.tags }}" | head -n1) | |
| docker run --rm "$IMAGE" source-extractor --version | |
| docker run --rm "$IMAGE" weightwatcher --version | |
| docker run --rm "$IMAGE" psfex --version | |
| - name: Test — shapepipe entry point | |
| run: | | |
| IMAGE=$(echo "${{ steps.meta.outputs.tags }}" | head -n1) | |
| docker run --rm "$IMAGE" shapepipe_run -c /app/example/config.ini | |
| - name: Push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} |