build ghcr.io/lesomnus/dev-python:3.14.6 #34
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: build | |
| run-name: build ${{ inputs.node }} | |
| # Builds and pushes a single graph node (one target image). It is dispatched by | |
| # refresh.yaml once per outdated node, in topological order, so that an internal | |
| # base is already pushed before its dependents build on top of it. | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| node: | |
| description: "Node id to build (the target reference, repo:tag)." | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: docker/setup-qemu-action@v4 | |
| - uses: docker/setup-buildx-action@v4 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| # Reuse the registry metadata cache to conserve rate limits. The base | |
| # digest label is always resolved fresh by clade, so this is safe. | |
| - uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/clade | |
| key: clade-cache-${{ github.run_id }} | |
| restore-keys: clade-cache- | |
| - run: go build -o /usr/local/bin/clade . | |
| - uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # `clade build <node>` recomputes the graph, then builds and pushes only | |
| # the requested node. The node's base is resolved from the registry, so it | |
| # picks up an internal parent that an earlier dispatch already pushed. | |
| - name: Build and push | |
| run: clade build "${{ inputs.node }}" |