name: Release Image # Primary release pipeline — pushes to registry.ginnoir.com (prod pulls this). # GitHub Actions .github/workflows/release.yml mirrors to GHCR as backup only. on: push: tags: - "v*" workflow_dispatch: jobs: build-and-push: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Derive image tags id: meta shell: bash run: | VERSION="${GITHUB_REF_NAME#v}" MAJOR_MINOR="$(printf '%s' "$VERSION" | awk -F. '{print $1"."$2}')" { echo "version=$VERSION" echo "major_minor=$MAJOR_MINOR" echo "image=registry.ginnoir.com/ginnoir/famapp" } >> "$GITHUB_OUTPUT" - name: Install docker run: apt-get update -qq && apt-get install -y -qq docker.io - name: Login to registry run: | echo "${{ secrets.REGISTRY_PUSH_PASSWORD }}" | docker login registry.ginnoir.com \ --username "${{ secrets.REGISTRY_PUSH_USERNAME }}" \ --password-stdin - name: Build image run: | docker build \ -t "${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.version }}" \ -t "${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.major_minor }}" \ -t "${{ steps.meta.outputs.image }}:latest" \ . - name: Push image run: | docker push "${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.version }}" docker push "${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.major_minor }}" docker push "${{ steps.meta.outputs.image }}:latest"