File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and publish packages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ env :
9+ IMAGE : lorisleiva/laravel-docker
10+
11+ jobs :
12+ docker :
13+ runs-on : ubuntu-latest
14+
15+ strategy :
16+ matrix :
17+ include :
18+ - tag : ' latest'
19+ php : ' 8.0'
20+ - tag : ' stable'
21+ php : ' 8.0'
22+ - tag : ' 8.1'
23+ php : ' 8.1'
24+ - tag : ' 8.0'
25+ php : ' 8.0'
26+ - tag : ' 7.4'
27+ php : ' 7.4'
28+
29+ steps :
30+ - uses : actions/checkout@v2
31+
32+ - name : Login to GitHub Container Registry
33+ uses : docker/login-action@v1
34+ with :
35+ registry : ghcr.io
36+ username : ${{ github.actor }}
37+ password : ${{ secrets.GITHUB_TOKEN }}
38+
39+ - name : Login to DockerHub
40+ uses : docker/login-action@v1
41+ with :
42+ username : ${{ secrets.DOCKERHUB_USERNAME }}
43+ password : ${{ secrets.DOCKERHUB_TOKEN }}
44+
45+ - name : Build and push
46+ id : docker_build
47+ uses : docker/build-push-action@v2
48+ with :
49+ push : true
50+ context : ${{ matrix.php }}
51+ tags : |
52+ ghcr.io/${{ env.IMAGE }}:${{ matrix.tag }}
53+ ${{ env.IMAGE }}:${{ matrix.tag }}
54+ cache-from : type=registry,ref=ghcr.io/${{ env.IMAGE }}:${{ matrix.tag }}
55+ cache-to : type=inline
You can’t perform that action at this time.
0 commit comments