add PHALCON_VERSION (#4) #7
This file contains 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-phalcon builder | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
env: | |
IMAGE_NAME: fizzka/docker-phalcon | |
PHALCON_VERSION: 5.3.1 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: | |
- 7.4 | |
- "8.0" | |
- 8.1 | |
- 8.2 | |
variant: | |
- "" # cli | |
- -fpm | |
os: | |
- "" # debian-latest | |
- -alpine | |
env: | |
PHP_VARIANT: ${{ matrix.php }}${{ matrix.variant }}${{ matrix.os }} | |
steps: | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Build | |
uses: docker/build-push-action@v5 | |
with: | |
load: true | |
file: Dockerfile${{ matrix.os }} | |
build-args: | | |
PHP_VARIANT=${{ env.PHP_VARIANT }} | |
PHALCON_VERSION=${{ env.PHALCON_VERSION }} | |
tags: ${{ env.IMAGE_NAME }}:${{ env.PHP_VARIANT }}-tesing | |
- | |
name: Test | |
run: docker run --rm ${{ env.IMAGE_NAME }}:${{ env.PHP_VARIANT }}-tesing sh -c "php -v; php --ri phalcon | grep -i ^version" | |
- | |
name: Login | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
if: github.event_name != 'pull_request' | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
file: Dockerfile${{ matrix.os }} | |
build-args: | | |
PHP_VARIANT=${{ env.PHP_VARIANT }} | |
PHALCON_VERSION=${{ env.PHALCON_VERSION }} | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ env.IMAGE_NAME }}:${{ env.PHP_VARIANT }} |