@@ -3,12 +3,12 @@ name: Docker PHP Images GitHub workflow
3
3
on :
4
4
pull_request :
5
5
branches :
6
- - ' v4-dev '
6
+ - ' v4'
7
7
push :
8
8
branches :
9
- - ' v4-dev '
10
- # schedule:
11
- # - cron: '0 0 * * 0'
9
+ - ' v4'
10
+ schedule :
11
+ - cron : ' 42 3 * * 0'
12
12
13
13
jobs :
14
14
build_test_maybe_release :
39
39
php_version : ' 7.2'
40
40
- variant : ' fpm'
41
41
php_version : ' 7.2'
42
- - variant : ' cli'
43
- php_version : ' 7.1'
44
- - variant : ' apache'
45
- php_version : ' 7.1'
46
- - variant : ' fpm'
47
- php_version : ' 7.1'
48
42
runs-on : ubuntu-latest
49
43
steps :
50
44
- name : Set up QEMU
@@ -54,22 +48,29 @@ jobs:
54
48
- uses : actions/checkout@v1
55
49
- name : Build and test
56
50
run : |
57
- PHP_VERSION="${{ matrix.php_version }}" BRANCH="v4-dev " VARIANT="${{ matrix.variant }}" ./build-and-test.sh
51
+ PHP_VERSION="${{ matrix.php_version }}" BRANCH="v4" VARIANT="${{ matrix.variant }}" ./build-and-test.sh
58
52
docker images | grep thecodingmachine/php
59
- # - name: Login to DockerHub
60
- # # Merge ~ push.
61
- # if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
62
- # uses: docker/login-action@v1
63
- # with:
64
- # username: ${{ secrets.DOCKERHUB_USERNAME }}
65
- # password: ${{ secrets.DOCKERHUB_TOKEN }}
66
- # - name: Release
67
- # # Merge ~ push.
68
- # if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
69
- # run: |
70
- # BRANCH_VARIANT=`echo "${{ matrix.variant }}" | sed 's/\./-/g'`
71
- # docker push thecodingmachine/php:${{ matrix.php_version }}-v3-slim-${BRANCH_VARIANT}
72
- # docker push thecodingmachine/php:${{ matrix.php_version }}-v3-${BRANCH_VARIANT}
73
- # docker push thecodingmachine/php:${{ matrix.php_version }}-v3-${BRANCH_VARIANT}-node8
74
- # docker push thecodingmachine/php:${{ matrix.php_version }}-v3-${BRANCH_VARIANT}-node10
75
- # docker push thecodingmachine/php:${{ matrix.php_version }}-v3-${BRANCH_VARIANT}-node12
53
+ - name : Login to DockerHub
54
+ # Merge ~ push.
55
+ if : ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
56
+ uses : docker/login-action@v1
57
+ with :
58
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
59
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
60
+ - name : Release
61
+ # Merge ~ push.
62
+ if : ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
63
+ run : |
64
+ BRANCH_VARIANT=`echo "${{ matrix.variant }}" | sed 's/\./-/g'`
65
+ docker push thecodingmachine/php:${{ matrix.php_version }}-v4-slim-${BRANCH_VARIANT}
66
+ docker push thecodingmachine/php:${{ matrix.php_version }}-v4-${BRANCH_VARIANT}
67
+ docker push thecodingmachine/php:${{ matrix.php_version }}-v4-${BRANCH_VARIANT}-node8
68
+ docker push thecodingmachine/php:${{ matrix.php_version }}-v4-${BRANCH_VARIANT}-node10
69
+ docker push thecodingmachine/php:${{ matrix.php_version }}-v4-${BRANCH_VARIANT}-node12
70
+ # Let's also tag PHP patch releases
71
+ PHP_PATCH_VERSION=`docker run --rm thecodingmachine/php:${{ matrix.php_version }}-v4-slim-${BRANCH_VARIANT} php -v | head -n1 | grep -P '\d+\.\d+\.\d+' -o`
72
+ docker push -t thecodingmachine/php:${PHP_PATCH_VERSION}-v4-slim-${BRANCH_VARIANT} thecodingmachine/php:${PHP_VERSION}-v4-slim-${BRANCH_VARIANT}
73
+ docker push -t thecodingmachine/php:${PHP_PATCH_VERSION}-v4-${BRANCH_VARIANT} thecodingmachine/php:${PHP_VERSION}-v4-${BRANCH_VARIANT}
74
+ docker push -t thecodingmachine/php:${PHP_PATCH_VERSION}-v4-${BRANCH_VARIANT}-node10 thecodingmachine/php:${PHP_VERSION}-v4-${BRANCH_VARIANT}-node10
75
+ docker push -t thecodingmachine/php:${PHP_PATCH_VERSION}-v4-${BRANCH_VARIANT}-node12 thecodingmachine/php:${PHP_VERSION}-v4-${BRANCH_VARIANT}-node12
76
+ docker push -t thecodingmachine/php:${PHP_PATCH_VERSION}-v4-${BRANCH_VARIANT}-node14 thecodingmachine/php:${PHP_VERSION}-v4-${BRANCH_VARIANT}-node14
0 commit comments