File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 6
6
pull_request :
7
7
branches : [ '*' ]
8
8
9
+ permissions :
10
+ # allow issuing OIDC tokens, needed for the depot.dev auth
11
+ id-token : write
12
+ # allow at least reading the repo contents, add other permissions if necessary
13
+ contents : read
14
+
9
15
jobs :
10
16
tests :
11
17
name : Build and tests PHP ${{ matrix.php_version }}, ${{ matrix.cpu }}
@@ -29,12 +35,18 @@ jobs:
29
35
30
36
- uses : depot/setup-action@v1
31
37
38
+ # We use this action instead of running `make docker-images-php-XX` directly because it lets us
39
+ # use OIDC authentication instead of a secret. Secrets can't be used in pull request builds.
32
40
- name : Build Docker images
33
- run : make docker-images-php-${{ matrix.php_version }}
41
+ uses : depot/bake-action@v1
42
+ with :
43
+ load : true
34
44
env :
35
45
CPU : ${{ matrix.cpu }}
36
- USE_DEPOT : 1
37
- DEPOT_TOKEN : ${{ secrets.DEPOT_TOKEN }}
46
+ CPU_PREFIX : ${{ (matrix.cpu == 'arm') && 'arm-' || '' }}
47
+ PHP_VERSION : ${{ matrix.php_version }}
48
+ IMAGE_VERSION_SUFFIX : ${{ (matrix.cpu == 'arm') && 'arm64' || 'x86_64' }}
49
+ DOCKER_PLATFORM : ${{ (matrix.cpu == 'arm') && 'linux/arm64' || 'linux/amd64' }}
38
50
39
51
- name : Test that layers can be exported
40
52
run : |
You can’t perform that action at this time.
0 commit comments