v5.1.10 #167
Workflow file for this run
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: publish | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
publish: | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ "7.4", "8.0", "8.1", "8.2", "8.3" ] | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout code | |
uses: actions/checkout@v4 | |
- | |
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@v3 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./php${{ matrix.php }}/Dockerfile | |
build-args: | | |
BF_IMAGE=${{ env.REPOSITORY_NAME }} | |
BF_PUBLISHING=1 | |
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 }} | |
ghcr.io/bfren/freescout:php${{ matrix.php }} | |
ghcr.io/bfren/freescout:php${{ matrix.php }}-${{ steps.version_major.outputs.contents }} | |
ghcr.io/bfren/freescout:php${{ matrix.php }}-${{ steps.version_minor.outputs.contents }} | |
ghcr.io/bfren/freescout:php${{ matrix.php }}-${{ steps.version.outputs.contents }} | |
ghcr.io/bfren/freescout:php${{ matrix.php }}-freescout${{ steps.freescout_minor.outputs.contents }} | |
ghcr.io/bfren/freescout:php${{ matrix.php }}-freescout${{ steps.freescout_minor.outputs.contents }}-${{ steps.version.outputs.contents }} | |
ghcr.io/bfren/freescout:php${{ matrix.php }}-freescout${{ steps.freescout_version.outputs.contents }} | |
ghcr.io/bfren/freescout:php${{ matrix.php }}-freescout${{ steps.freescout_version.outputs.contents }}-${{ steps.version.outputs.contents }} | |
ghcr.io/bfren/freescout:php${{ steps.php_revision.outputs.contents }} | |
- | |
name: Build and push default tags | |
id: docker_build_default | |
if: matrix.php == '8.2' | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./php${{ matrix.php }}/Dockerfile | |
build-args: | | |
BF_IMAGE=${{ env.REPOSITORY_NAME }} | |
BF_PUBLISHING=1 | |
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 }} | |
ghcr.io/bfren/freescout:freescout${{ steps.freescout_version.outputs.contents }} | |
ghcr.io/bfren/freescout:freescout${{ steps.freescout_version.outputs.contents }}-${{ steps.version.outputs.contents }} | |
- | |
name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |