fix(workflow): accurate list total past 1000 runs #53
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: Docker Publish | |
| # Builds the daemon image (Dockerfile) and pushes it to GHCR so | |
| # `docker-compose.yaml` (ghcr.io/launchapp-dev/animus:latest) pulls the | |
| # current release instead of a stale one. Runs on every version tag, and | |
| # can be fired manually for a specific ref via workflow_dispatch. | |
| # | |
| # Built for linux/amd64 only: several launchapp-dev plugin release binaries | |
| # ship no aarch64-unknown-linux-gnu asset, so an arm64 image cannot install | |
| # the required-role plugins at build time (see Dockerfile). | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: Git ref (tag or branch) to build and publish. | |
| required: true | |
| default: main | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| IMAGE: ghcr.io/launchapp-dev/animus | |
| jobs: | |
| build-push: | |
| name: build + push ${{ github.event.inputs.ref || github.ref_name }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.ref || github.ref }} | |
| - name: Resolve image version tag | |
| id: meta | |
| run: | | |
| set -euo pipefail | |
| REF="${{ github.event.inputs.ref || github.ref_name }}" | |
| # Strip a leading refs/tags/ or refs/heads/ and a leading v. | |
| REF="${REF#refs/tags/}"; REF="${REF#refs/heads/}" | |
| VERSION="${REF#v}" | |
| # Sanitize for a docker tag (no slashes). | |
| VERSION="${VERSION//\//-}" | |
| echo "version=${VERSION}" >> "$GITHUB_OUTPUT" | |
| # Only move :latest for real version tags (vX.Y.Z), not branch builds. | |
| if [[ "$REF" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | |
| echo "tags=${IMAGE}:${VERSION},${IMAGE}:latest" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "tags=${IMAGE}:${VERSION}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/amd64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| provenance: false |