@@ -2,6 +2,9 @@ name: CI/CD
22
33on : [push, workflow_dispatch]
44
5+ env :
6+ DOCKER_BUILDKIT : 1
7+
58jobs :
69 build :
710 name : Build
@@ -15,45 +18,23 @@ jobs:
1518 - name : Checkout code
1619 uses : actions/checkout@v2
1720
18- - name : Set up Docker Buildx
19- uses : docker/setup-buildx-action@v1
20-
21- - name : Cache Docker layers
22- uses : actions/cache@v2
23- with :
24- path : /tmp/.buildx-cache
25- key : docker-buildx-${{ matrix.version }}${{ matrix.type }}-${{ github.sha }}
26- restore-keys : docker-buildx-${{ matrix.version }}${{ matrix.type }}-
27-
2821 - name : Build
2922 run : |
30- docker buildx build \
31- --cache-from type=local,src=/tmp/.buildx-cache/${{ matrix.version }}${{ matrix.type }} \
32- --cache-to type=local,dest=/tmp/.buildx-cache/${{ matrix.version }}${{ matrix.type }} \
33- --output type=docker \
23+ docker build \
3424 --tag kooldev/php:${{ matrix.version }}${{ matrix.type }} \
3525 ${{ matrix.version }}${{ matrix.type }}
3626
37- docker buildx build \
38- --cache-from type=local,src=/tmp/.buildx-cache/${{ matrix.version }}-wkhtmltopdf${{ matrix.type }} \
39- --cache-to type=local,dest=/tmp/.buildx-cache/${{ matrix.version }}-wkhtmltopdf${{ matrix.type }} \
40- --output type=docker \
27+ docker build \
4128 --tag kooldev/php:${{ matrix.version }}-wkhtmltopdf${{ matrix.type }} \
4229 ${{ matrix.version }}-wkhtmltopdf${{ matrix.type }}
4330
4431 - name : Build (nginx)
4532 run : |
46- docker buildx build \
47- --cache-from type=local,src=/tmp/.buildx-cache/${{ matrix.version }}-nginx${{ matrix.type }} \
48- --cache-to type=local,dest=/tmp/.buildx-cache/${{ matrix.version }}-nginx${{ matrix.type }} \
49- --output type=docker \
33+ docker build \
5034 --tag kooldev/php:${{ matrix.version }}-nginx${{ matrix.type }} \
5135 ${{ matrix.version }}-nginx${{ matrix.type }}
5236
53- docker buildx build \
54- --cache-from type=local,src=/tmp/.buildx-cache/${{ matrix.version }}-nginx-wkhtmltopdf${{ matrix.type }} \
55- --cache-to type=local,dest=/tmp/.buildx-cache/${{ matrix.version }}-nginx-wkhtmltopdf${{ matrix.type }} \
56- --output type=docker \
37+ docker build \
5738 --tag kooldev/php:${{ matrix.version }}-nginx-wkhtmltopdf${{ matrix.type }} \
5839 ${{ matrix.version }}-nginx-wkhtmltopdf${{ matrix.type }}
5940
6243 for suffix in '' -wkhtmltopdf -nginx -nginx-wkhtmltopdf; do
6344 docker run kooldev/php:${{ matrix.version }}$suffix${{ matrix.type }} php -v
6445 docker run kooldev/php:${{ matrix.version }}$suffix${{ matrix.type }} composer -V
46+ docker run kooldev/php:${{ matrix.version }}$suffix${{ matrix.type }} composer2 -V
6547 docker run -e ASUSER=1000 kooldev/php:${{ matrix.version }}$suffix${{ matrix.type }} php -v
6648 docker run -e ASUSER=1000 kooldev/php:${{ matrix.version }}$suffix${{ matrix.type }} composer -V
49+ docker run -e ASUSER=1000 kooldev/php:${{ matrix.version }}$suffix${{ matrix.type }} composer2 -V
6750 docker run kooldev/php:${{ matrix.version }}$suffix${{ matrix.type }} php -m
6851 docker run -e ENABLE_XDEBUG=true kooldev/php:${{ matrix.version }}$suffix${{ matrix.type }} php -m
6952 done
9881 uses : benc-uk/workflow-dispatch@v1.1
9982 if : github.ref == 'refs/heads/master' && github.repository == 'kool-dev/docker-php'
10083 with :
101- workflow : CI
84+ workflow : CI/CD
10285 repo : kool-dev/docker-wordpress
10386 token : ${{ secrets.WORKFLOW_TOKEN }}
0 commit comments