File tree Expand file tree Collapse file tree 7 files changed +34
-41
lines changed
Expand file tree Collapse file tree 7 files changed +34
-41
lines changed Original file line number Diff line number Diff line change 1818 runs-on : ubuntu-latest
1919 steps :
2020 - uses : actions/checkout@v4
21-
2221 - uses : docker/setup-buildx-action@v3
23-
24- - name : Generate php image tags
25- uses : docker/metadata-action@v5
22+ - uses : docker/metadata-action@v5
2623 id : meta-php
2724 with :
2825 bake-target : php
3229 type=ref,event=branch
3330 type=semver,pattern={{version}}
3431 type=semver,pattern={{major}}.{{minor}}
35-
36- - name : Generate nginx image tags
37- uses : docker/metadata-action@v5
32+ - uses : docker/metadata-action@v5
3833 id : meta-nginx
3934 with :
4035 bake-target : nginx
@@ -44,13 +39,11 @@ jobs:
4439 type=ref,event=branch
4540 type=semver,pattern={{version}}
4641 type=semver,pattern={{major}}.{{minor}}
47-
4842 - uses : docker/login-action@v3
4943 with :
5044 registry : ghcr.io
5145 username : ${{ github.actor }}
5246 password : ${{ github.token }}
53-
5447 - uses : docker/bake-action@v5
5548 with :
5649 targets : production
Original file line number Diff line number Diff line change 11name : CI
22
33on :
4- push :
5- branches-ignore :
6- - main
7- - renovate/**
8- - release-**
94 pull_request :
105 branches-ignore :
116 - renovate/**
127 - release-**
138 workflow_dispatch :
149
1510jobs :
11+ pint :
12+ name : Pint
13+ runs-on : ubuntu-22.04
14+ steps :
15+ - uses : actions/checkout@v4
16+ - uses : docker/setup-buildx-action@v3
17+ - uses : docker/login-action@v3
18+ with :
19+ registry : ghcr.io
20+ username : ${{ github.actor }}
21+ password : ${{ github.token }}
22+ - run : docker compose -f docker-compose.testing.yml run --rm testing ./vendor/bin/pint --test
1623 test :
1724 uses : ./.github/workflows/test.yml
1825 build :
Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - main
7- workflow_dispatch :
7+ workflow_dispatch :
88
99jobs :
1010 release-please :
11- runs-on : ubuntu-latest
11+ runs-on : ubuntu-22.04
1212 steps :
1313 - uses : googleapis/release-please-action@v4
1414 with :
1515 release-type : ' php'
16- token : ' ${{ secrets.RELEASE_PLEASE }}'
16+ token : ' ${{ secrets.RELEASE_PLEASE_TOKEN }}'
Original file line number Diff line number Diff line change @@ -11,20 +11,15 @@ permissions:
1111 packages : write
1212
1313jobs :
14- test :
15- runs-on : ubuntu-latest
14+ run :
15+ name : Run
16+ runs-on : ubuntu-22.04
1617 steps :
1718 - uses : actions/checkout@v4
18-
1919 - uses : docker/setup-buildx-action@v3
20-
2120 - uses : docker/login-action@v3
2221 with :
2322 registry : ghcr.io
2423 username : ${{ github.actor }}
2524 password : ${{ github.token }}
26-
27- - uses : docker/bake-action@v5
28- with :
29- targets : testing
30- files : ./docker-bake.hcl
25+ - run : docker compose -f docker-compose.testing.yml run --rm testing php artisan test
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ COPY --chown=www-data:www-data storage storage
8989COPY tests tests
9090COPY artisan .
9191COPY phpunit.xml .
92- COPY .env.example .env
92+ COPY .env.example .env.testing
9393RUN composer dump-autoload --optimize \
94- && php artisan key:generate \
95- && php artisan test
94+ && php artisan key:generate --env=testing
95+ USER www-data
Original file line number Diff line number Diff line change @@ -30,15 +30,3 @@ target "nginx" {
3030group "production" {
3131 targets = [" php" , " nginx" ]
3232}
33-
34- target "testing" {
35- dockerfile = " containers/php/Dockerfile"
36- context = " ."
37- target = " testing"
38- output = [
39- " type=cacheonly"
40- ]
41- cache-from = [
42- " type=gha,scope=php"
43- ]
44- }
Original file line number Diff line number Diff line change 1+ services :
2+ testing :
3+ build :
4+ dockerfile : containers/php/Dockerfile
5+ context : .
6+ target : testing
7+ cache_to :
8+ - type=gha,mode=max,scope=testing
9+ cache_from :
10+ - type=gha,scope=testing
You can’t perform that action at this time.
0 commit comments