Skip to content

Update

Update #317

Workflow file for this run

name: Build Swow
on: [ push ]
env:
ENGINE: 'swow'
SW_VERSION: 'v1.3.1'
COMPOSER_VERSION: '2.6.5'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_ACCESSTOKEN }}
jobs:
build:
name: Build PHP ${{ matrix.php-version }} Alpine ${{ matrix.alpine-version }}
runs-on: '${{ matrix.os }}'
env:
ALPINE_VERSION: '${{ matrix.alpine-version }}'
PHP_VERSION: '${{ matrix.php-version }}'
strategy:
matrix:
os: [ ubuntu-latest ]
php-version: [ '8.0', '8.1', '8.2' ]
alpine-version: [ '3.14', '3.15', '3.16', '3.17', '3.18', 'edge' ]
exclude:
- php-version: '8.2'
alpine-version: '3.14'
- php-version: '8.2'
alpine-version: '3.15'
- php-version: '8.2'
alpine-version: '3.16'
- php-version: '8.2'
alpine-version: '3.17'
- php-version: '8.1'
alpine-version: '3.14'
- php-version: '8.1'
alpine-version: '3.15'
- php-version: '8.0'
alpine-version: '3.17'
- php-version: '8.0'
alpine-version: '3.18'
- php-version: '8.0'
alpine-version: 'edge'
max-parallel: 8
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Fetch the PHP BUILD VERSION
id: fetch-php-build-version
shell: php {0}
run: |
<?php
$alpineVersion = getenv('ALPINE_VERSION');
$phpVersion = getenv('PHP_VERSION');
$version = match($phpVersion){
'8.1' => '81',
'8.2' => '82',
default => substr($phpVersion, 0, 1)
};
echo "::set-output name=version::" . $version . PHP_EOL;
- name: Build
run: export PHP_BUILD_VERSION=${{ steps.fetch-php-build-version.outputs.version }} && docker-compose build alpine-swow
- name: Push Images to Docker Hub
if: ${{ github.ref == 'refs/heads/build'}}
run: ./.github/workflows/push.sh