| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- name: Docker Release Publish (multi-arch)
- on:
- workflow_dispatch:
- inputs:
- version:
- description: "RackPeek version (e.g. v1.0.0)"
- required: true
- default: "v0.0.12"
- permissions:
- contents: read
- jobs:
- docker:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- # Multi-arch support
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v3
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
- - name: Login to Docker Hub
- uses: docker/login-action@v3
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
- - name: Validate version input
- run: |
- VERSION="${{ github.event.inputs.version }}"
- echo "VERSION=$VERSION" >> $GITHUB_ENV
- # Require v-prefixed semver like v1.2.3
- if ! echo "$VERSION" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
- echo "Invalid version: $VERSION"
- echo "Expected format: vMAJOR.MINOR.PATCH (e.g. v1.0.0)"
- exit 1
- fi
- - name: Build and push release image (multi-arch)
- uses: docker/build-push-action@v5
- env:
- BUILDKIT_PROGRESS: plain
- with:
- context: .
- file: ./RackPeek.Web/Dockerfile
- platforms: linux/amd64,linux/arm64
- push: true
- target: final
- tags: |
- aptacode/rackpeek:${{ env.VERSION }}
- aptacode/rackpeek:latest
- cache-from: type=gha
- cache-to: type=gha,mode=max
|