File tree 3 files changed +53
-4
lines changed
3 files changed +53
-4
lines changed Original file line number Diff line number Diff line change 95
95
PLATFORM : ${{ matrix.image }}
96
96
run : |
97
97
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
98
- bin/stubs/build_docker.sh
99
98
php bin/ci/build-docker.php
100
99
101
100
merge-docker :
Original file line number Diff line number Diff line change
1
+ name : Build docker image for stubs
2
+
3
+ concurrency :
4
+ group : ${{ github.workflow }}-${{ github.ref }}
5
+ cancel-in-progress : true
6
+
7
+ on :
8
+ push :
9
+ branches :
10
+ - master
11
+ - 6.x
12
+
13
+ permissions :
14
+ contents : read
15
+
16
+ jobs :
17
+ pre_job :
18
+ permissions :
19
+ actions : write
20
+ runs-on : ubuntu-latest
21
+ outputs :
22
+ should_skip : ${{ steps.skip_check.outputs.should_skip }}
23
+ steps :
24
+ - id : skip_check
25
+ uses : fkirc/skip-duplicate-actions@v5.3.1
26
+ with :
27
+ cancel_others : true
28
+ do_not_skip : ' ["release"]'
29
+ paths : ' [".github/**", "bin/**"]'
30
+
31
+ build-stubs-docker :
32
+ permissions :
33
+ packages : write
34
+ needs : pre_job
35
+ if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
36
+ runs-on : ubuntu-latest
37
+ steps :
38
+ - uses : actions/checkout@v4
39
+
40
+ - name : Set up Docker Buildx
41
+ id : buildx
42
+ uses : docker/setup-buildx-action@v3
43
+
44
+ - name : Upload docker image
45
+ env :
46
+ EVENT_NAME : ${{ github.event_name }}
47
+ REF : ${{ github.ref }}
48
+ ACTOR : ${{ github.repository_owner }}
49
+ run : |
50
+ echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
51
+ bin/stubs/build_docker.sh
52
+
Original file line number Diff line number Diff line change 1
1
#! /bin/bash -e
2
2
3
- if [ " $PLATFORM " != " ubuntu-latest" ]; then exit 0; fi
4
-
5
3
VERSIONS=" 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4"
6
4
7
5
for f in $VERSIONS ; do
8
6
{
9
- docker build --build-arg VERSION=$f . -f bin/stubs/Dockerfile_$f -t ghcr.io/$ACTOR /psalm:internal_stubs_$f
7
+ docker buildx build --push --cache-to type=inline --cache-from type=registry,ref=ghcr.io/ $ACTOR /psalm:internal_stubs_ $f --build-arg VERSION=$f . -f bin/stubs/Dockerfile_$f -t ghcr.io/$ACTOR /psalm:internal_stubs_$f
10
8
} &
11
9
if [ " $f " == " 7.1" ] || [ " $f " == " 7.3" ] || [ " $f " == " 8.0" ] || [ " $f " == " 8.2" ] || [ " $f " == " 8.4" ]; then wait ; fi
12
10
done
You can’t perform that action at this time.
0 commit comments