perf(core): per-directory decision cursor for the exclusion preview +… #108
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: Docker | |
| # Publish the public headless Driven image (driven-cli + driven-chaos) to | |
| # ghcr.io/pmaxhogan/driven. This is intentionally a STANDALONE workflow so it | |
| # never destabilizes the desktop-app pipelines (release.yml / dev-channel.yml). | |
| # | |
| # Tag semantics (docker/metadata-action): | |
| # push to main -> :dev, :nightly (latest main commit) | |
| # push tag v* -> :vX.Y.Z, :vX, :latest, :stable (the exact release) | |
| # | |
| # NOTE: :latest, :stable and :vX are MUTABLE tags resolved by the registry on a | |
| # last-write-wins basis, so releases must be published in ASCENDING version | |
| # order for them to point at the highest version. The linear release-please flow | |
| # already publishes tags in order, so this holds. latest/stable are additionally | |
| # gated to non-prerelease tags (see the "release channel" step) so an -rc/-beta | |
| # tag can never hijack :latest/:stable. | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| workflow_dispatch: | |
| concurrency: | |
| # Never cancel in-flight publishes (a cancelled tag publish could leave the | |
| # mutable tags half-updated); just serialize per ref. | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| docker: | |
| name: build + push image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Determine release channel | |
| id: channel | |
| # stable=true only for a non-prerelease v* tag (no '-' => no -rc/-beta). | |
| run: | | |
| if [[ "${GITHUB_REF}" == refs/tags/v* && "${GITHUB_REF}" != *-* ]]; then | |
| echo "stable=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "stable=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - uses: docker/setup-buildx-action@v4 | |
| - name: Log in to ghcr.io | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Docker metadata (tags + labels) | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| # We assign latest/stable ourselves (gated to real releases below), so | |
| # disable metadata-action's automatic :latest. | |
| flavor: | | |
| latest=false | |
| # type=semver only fires on a v* tag; type=raw dev/nightly only on main. | |
| # type=semver also auto-suppresses {{major}} for a prerelease tag. | |
| tags: | | |
| type=raw,value=dev,enable=${{ github.ref == 'refs/heads/main' }} | |
| type=raw,value=nightly,enable=${{ github.ref == 'refs/heads/main' }} | |
| type=semver,pattern=v{{version}} | |
| type=semver,pattern=v{{major}} | |
| type=raw,value=latest,enable=${{ steps.channel.outputs.stable == 'true' }} | |
| type=raw,value=stable,enable=${{ steps.channel.outputs.stable == 'true' }} | |
| # Link the ghcr package to this repo (helps it inherit repo visibility | |
| # / provenance once the package is made public). | |
| labels: | | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| # The chaos soak target (issue #23) is an x86_64 TrueNAS Scale NAS; | |
| # amd64-only keeps build time + registry size down. | |
| platforms: linux/amd64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |