Skip to content

Commit 0159c3d

Browse files
committed
CI: reuse workflows
1 parent 38a0076 commit 0159c3d

File tree

1 file changed

+38
-63
lines changed

1 file changed

+38
-63
lines changed

.github/workflows/docker.yml

Lines changed: 38 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,46 @@
1-
name: Docker
1+
name: "Docker"
22

33
on:
4+
workflow_dispatch:
5+
46
push:
5-
branches: ["*"]
7+
branches: ["master"]
8+
9+
schedule:
10+
- cron: "0 8 * * 1"
611

712
jobs:
8-
docker:
9-
runs-on: ubuntu-latest
13+
build:
14+
name: "Build"
15+
uses: dockette/.github/.github/workflows/docker.yml@master
16+
secrets: inherit
17+
with:
18+
image: "dockette/ci"
19+
tag: "${{ matrix.item }}"
20+
context: "${{ matrix.item }}"
1021
strategy:
1122
matrix:
1223
include:
13-
- version: "5.6"
14-
- version: "5.6-fpm"
15-
- version: "7.0"
16-
- version: "7.0-fpm"
17-
- version: "7.1"
18-
- version: "7.1-fpm"
19-
- version: "7.2"
20-
- version: "7.2-fpm"
21-
- version: "7.3"
22-
- version: "7.3-fpm"
23-
- version: "7.4"
24-
- version: "7.4-fpm"
25-
- version: "8.0"
26-
- version: "8.0-fpm"
27-
- version: "8.1"
28-
- version: "8.1-fpm"
29-
- version: "8.2"
30-
- version: "8.2-fpm"
31-
- version: "8.3"
32-
- version: "8.3-fpm"
33-
34-
fail-fast: false
35-
36-
name: Docker (dockette/php:${{ matrix.version }})
37-
38-
steps:
39-
- name: Checkout
40-
uses: actions/checkout@v2
41-
42-
- name: Login to DockerHub
43-
uses: docker/login-action@v1
44-
with:
45-
username: ${{ secrets.DOCKERHUB_USERNAME }}
46-
password: ${{ secrets.DOCKERHUB_TOKEN }}
47-
48-
- name: Set up QEMU
49-
uses: docker/setup-qemu-action@v1
50-
51-
- name: Set up Docker Buildx
52-
uses: docker/setup-buildx-action@v1
53-
54-
- name: Cache Docker layers
55-
uses: actions/cache@v2
56-
with:
57-
path: /tmp/.buildx-cache
58-
key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.version }}
59-
restore-keys: |
60-
${{ runner.os }}-buildx-
61-
62-
- name: Build and push
63-
if: github.ref == 'refs/heads/master'
64-
uses: docker/build-push-action@v2
65-
with:
66-
context: ${{ matrix.version }}
67-
push: true
68-
tags: dockette/php:${{ matrix.version }}
69-
cache-from: type=local,src=/tmp/.buildx-cache
70-
cache-to: type=local,dest=/tmp/.buildx-cache
71-
platforms: ${{ matrix.platforms || 'linux/amd64,linux/arm64' }}
24+
# PHP
25+
- item: php56
26+
- item: php56-fpm
27+
- item: php70
28+
- item: php70-fpm
29+
- item: php71
30+
- item: php71-fpm
31+
- item: php72
32+
- item: php72-fpm
33+
- item: php73
34+
- item: php73-fpm
35+
- item: php74
36+
- item: php74-fpm
37+
- item: php80
38+
- item: php80-fpm
39+
- item: php81
40+
- item: php81-fpm
41+
- item: php82
42+
- item: php82-fpm
43+
- item: php83
44+
- item: php83-fpm
45+
46+
fail-fast: false

0 commit comments

Comments
 (0)