Skip to content

v4.0.22

v4.0.22 #129

Workflow file for this run

name: publish
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
strategy:
fail-fast: false
matrix:
php: [ "7.4", "8.0", "8.1", "8.2" ]
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v3
-
name: Get repository name
run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
shell: bash
-
name: Read PHP version - revision
uses: bfren/read-file@v2
with:
file: ./php${{ matrix.php }}/overlay/tmp/PHP_REVISION
id: php_revision
-
name: Read FreeScout minor version
uses: bfren/read-file@v2
with:
file: ./overlay/tmp/FREESCOUT_MINOR
id: freescout_minor
-
name: Read FreeScout version
uses: bfren/read-file@v2
with:
file: ./overlay/tmp/FREESCOUT_REVISION
id: freescout_version
-
name: Read image version
uses: bfren/read-file@v2
with:
file: ./VERSION_MAJOR
id: version_major
-
name: Read image version
uses: bfren/read-file@v2
with:
file: ./VERSION_MINOR
id: version_minor
-
name: Read image version
uses: bfren/read-file@v2
with:
file: ./VERSION
id: version
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: ./php${{ matrix.php }}/Dockerfile
build-args: |
BF_IMAGE=${{ env.REPOSITORY_NAME }}
BF_VERSION=${{ steps.version.outputs.contents }}
push: true
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: |
bfren/freescout:php${{ matrix.php }}
bfren/freescout:php${{ matrix.php }}-${{ steps.version_major.outputs.contents }}
bfren/freescout:php${{ matrix.php }}-${{ steps.version_minor.outputs.contents }}
bfren/freescout:php${{ matrix.php }}-${{ steps.version.outputs.contents }}
bfren/freescout:php${{ matrix.php }}-freescout${{ steps.freescout_minor.outputs.contents }}
bfren/freescout:php${{ matrix.php }}-freescout${{ steps.freescout_minor.outputs.contents }}-${{ steps.version.outputs.contents }}
bfren/freescout:php${{ matrix.php }}-freescout${{ steps.freescout_version.outputs.contents }}
bfren/freescout:php${{ matrix.php }}-freescout${{ steps.freescout_version.outputs.contents }}-${{ steps.version.outputs.contents }}
bfren/freescout:php${{ steps.php_revision.outputs.contents }}
-
name: Build and push default tags
id: docker_build_default
if: matrix.php == '8.1'
uses: docker/build-push-action@v4
with:
context: .
file: ./php${{ matrix.php }}/Dockerfile
build-args: |
BF_IMAGE=${{ env.REPOSITORY_NAME }}
BF_VERSION=${{ steps.version.outputs.contents }}
push: true
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: |
bfren/freescout:freescout${{ steps.freescout_version.outputs.contents }}
bfren/freescout:freescout${{ steps.freescout_version.outputs.contents }}-${{ steps.version.outputs.contents }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}