-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (83 loc) · 2.7 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: ci
on: [push]
jobs:
start:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-20.04]
steps:
- name: cdout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install npm dependencies
timeout-minutes: 60
run: npm install
- name: linter markdown
timeout-minutes: 60
run: npm run lint:markdown
- name: linter docker
timeout-minutes: 60
continue-on-error: true
run: npm run lint:docker
generatejobs:
name: Generate Jobs
runs-on: ubuntu-latest
outputs:
php: ${{ steps.json_properties.outputs.php }}
steps:
- uses: actions/checkout@v4
- name: get jobs by matrix.json
id: json_properties
uses: zoexx/github-action-json-file-properties@release
with:
file_path: "matrix.json"
php:
strategy:
fail-fast: false
matrix:
php: ${{ fromJson(needs.generatejobs.outputs.php) }}
name: PHP ${{ matrix.php.version }}
needs: generatejobs
runs-on: ubuntu-22.04
steps:
- name: cdout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install npm dependencies
timeout-minutes: 60
run: npm install
- name: "Generate file SH"
timeout-minutes: 60
if: matrix.php.latest == 'off' && matrix.php.disable == 'off'
run: npm run docker:build:php --folder=${{ matrix.php.version }}
- name: "Generate file SH IF LAST"
timeout-minutes: 60
if: matrix.php.latest == 'on' && matrix.php.disable == 'off'
run: npm run docker:build:php --folder=${{ matrix.php.version }} --latest
- name: "Build image"
timeout-minutes: 60
if: matrix.php.disable == 'off'
run: ./build-php-${{ matrix.php.version }}.sh
- name: "Show images"
timeout-minutes: 60
if: matrix.php.disable == 'off'
run: npm run docker:image:ls
- name: Set up QEMU
if: github.ref == 'refs/heads/main' && matrix.php.disable == 'off'
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: github.ref == 'refs/heads/main' && matrix.php.disable == 'off'
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: github.ref == 'refs/heads/main' && matrix.php.disable == 'off'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker
if: github.ref == 'refs/heads/main' && matrix.php.disable == 'off'
run: npm run docker:push:php