0.15.1 #13
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: publish basic container | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| # Ne pas accumuler de runs en parallèle si plusieurs releases sont publiées | |
| # coup-sur-coup — la 2e annule la 1re. | |
| concurrency: | |
| group: docker-publish-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_BASE: ${{ github.repository }} | |
| jobs: | |
| # Backend et frontend tournent en parallèle — aucune dépendance entre eux, | |
| # aucune raison de payer la latence d'un build séquentiel. | |
| build-api: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install cosign | |
| uses: sigstore/cosign-installer@main | |
| with: | |
| cosign-release: 'v2.2.4' | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata (api) | |
| id: meta | |
| uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_BASE }}/api | |
| - name: Build and push backend image | |
| id: build-and-push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./ | |
| file: ./apps/api/Dockerfile | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: linux/amd64 | |
| - name: Sign the backend image | |
| env: | |
| TAGS: ${{ steps.meta.outputs.tags }} | |
| DIGEST: ${{ steps.build-and-push.outputs.digest }} | |
| run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} | |
| build-tracker: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install cosign | |
| uses: sigstore/cosign-installer@main | |
| with: | |
| cosign-release: 'v2.2.4' | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata (backend) | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_BASE }}/tracker | |
| - name: Build and push backend image | |
| id: build-and-push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./ | |
| file: ./apps/tracker/Dockerfile | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: linux/amd64 | |
| - name: Sign the backend image | |
| env: | |
| TAGS: ${{ steps.meta.outputs.tags }} | |
| DIGEST: ${{ steps.build-and-push.outputs.digest }} | |
| run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} | |
| build-front-ssr: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install cosign | |
| uses: sigstore/cosign-installer@main | |
| with: | |
| cosign-release: 'v2.2.4' | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata (backend) | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_BASE }}/front-ssr | |
| - name: Build and push backend image | |
| id: build-and-push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./ | |
| file: ./apps/web/Dockerfile | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: linux/amd64 | |
| - name: Sign the backend image | |
| env: | |
| TAGS: ${{ steps.meta.outputs.tags }} | |
| DIGEST: ${{ steps.build-and-push.outputs.digest }} | |
| run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} | |
| build-front: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install cosign | |
| uses: sigstore/cosign-installer@main | |
| with: | |
| cosign-release: 'v2.2.4' | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata (backend) | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_BASE }}/front | |
| - name: Build and push backend image | |
| id: build-and-push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./ | |
| file: ./apps/web/Dockerfile.static | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: linux/amd64 | |
| - name: Sign the backend image | |
| env: | |
| TAGS: ${{ steps.meta.outputs.tags }} | |
| DIGEST: ${{ steps.build-and-push.outputs.digest }} | |
| run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} | |
| # Documentation site (VitePress static + distroless nginx). | |
| # Self-contained npm project under ./doc — context scoped there | |
| # so the build doesn't drag the rest of the monorepo into the | |
| # builder layer. | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install cosign | |
| uses: sigstore/cosign-installer@main | |
| with: | |
| cosign-release: 'v2.2.4' | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata (docs) | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_BASE }}/docs | |
| - name: Build and push docs image | |
| id: build-and-push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| # The doc bundle is a self-contained npm project; scope | |
| # the build context to ./doc so the COPY in Dockerfile | |
| # resolves locally and we don't ship pnpm workspace | |
| # overhead into the builder layer. | |
| context: ./doc | |
| file: ./doc/Dockerfile | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: linux/amd64 | |
| # Default base path is `/`, matching the standalone | |
| # docker-run usage. The GitHub Pages deploy | |
| # (deploy-docs.yml) keeps its own `/opentracker/` base | |
| # via the VitePress config fallback. | |
| build-args: | | |
| VITEPRESS_BASE=/ | |
| - name: Sign the docs image | |
| env: | |
| TAGS: ${{ steps.meta.outputs.tags }} | |
| DIGEST: ${{ steps.build-and-push.outputs.digest }} | |
| run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} |