Skip to content

1.24.0

1.24.0 #51

name: Build and push containers
on:
release:
types: [published]
jobs:
release-contaienr:
runs-on: ubuntu-latest
steps:
- name: Compile tag list
id: tags
run: |
TAG=${GITHUB_REF/refs\/tags\//}
PREFIX=ghcr.io/laminas/laminas-ci-matrix
MAJOR="${PREFIX}:$(echo ${TAG} | cut -d. -f1)"
MINOR="${MAJOR}.$(echo ${TAG} | cut -d. -f2)"
PATCH="${PREFIX}:${TAG}"
echo "tags=[\"${MAJOR}\",\"${MINOR}\",\"${PATCH}\"]" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v3
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.CONTAINER_USERNAME }}
password: ${{ secrets.CONTAINER_PAT }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ${{ join(fromJSON(steps.tags.outputs.tags), ',') }}