-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (76 loc) · 2.07 KB
/
build.yml
File metadata and controls
87 lines (76 loc) · 2.07 KB
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
84
85
86
87
name: Build Php Extensions
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php_version:
- 8.2
- 8.3
- 8.4
extension:
- xdebug
- pgsql
- pdo_pgsql
- redis
- opcache
- pcntl
- zip
- intl
arch:
- amd64
- arm64
name: ext-${{ matrix.extension }}@php${{ matrix.php_version }}@${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/${{ matrix.arch }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/${{ matrix.arch }}
- name: Build and push
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_SUMMARY: "false"
with:
platforms: linux/${{ matrix.arch }}
push: false
outputs: .
build-args: |
PHP_VERSION=${{ matrix.php_version }}
PHP_EXTENSION=${{ matrix.extension }}
- run: ls -Al
- name: Archive extension
uses: actions/upload-artifact@v4
with:
name: ext-${{ matrix.extension }}-php-${{ matrix.php_version }}-${{ matrix.arch }}
path: ${{ matrix.extension }}.so
retention-days: 1
if-no-files-found: error
upload:
runs-on: ubuntu-latest
needs:
- build
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
pattern: "!*.dockerbuild"
- name: Merge extensions
run: |
rsync -a artifacts/ extensions/
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add extensions
git commit --no-interactive -m "chore: update extensions"
git push