File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 - cron : 00 4 * * *
1010
1111jobs :
12- ghcr :
12+ php7 :
1313 runs-on : ubuntu-latest
1414
1515 steps :
6363 - name : Push with commit php7-review tag
6464 run : docker push ghcr.io/${{ github.repository_owner }}/${{ env.CI_REPOSITORY_NAME }}:php7-review
6565
66+ php8 :
67+ runs-on : ubuntu-latest
68+ steps :
69+ - name : GitHub Environment Variables Action
70+ uses : FranzDiebold/github-env-vars-action@v2
71+
72+ - name : Shallow clone code
73+ uses : actions/checkout@v3
74+ with :
75+ fetch-depth : 0
76+
77+ - name : Login to Container Registry ghcr.io
78+ uses : docker/login-action@v2
79+ with :
80+ registry : ghcr.io
81+ username : ${{ github.actor }}
82+ password : ${{ secrets.GITHUB_TOKEN }}
83+
6684 # php8
6785 - name : Build the container image
6886 run : docker build . --tag ghcr.io/${{ github.repository_owner }}/${{ env.CI_REPOSITORY_NAME }}:php8 --file Dockerfile.php8
@@ -88,6 +106,20 @@ jobs:
88106 - name : Push with commit php8-review tag
89107 run : docker push ghcr.io/${{ github.repository_owner }}/${{ env.CI_REPOSITORY_NAME }}:php8-review
90108
109+ cleanup :
110+ needs : [php7, php8]
111+ runs-on : ubuntu-latest
112+ steps :
113+ - name : GitHub Environment Variables Action
114+ uses : FranzDiebold/github-env-vars-action@v2
115+
116+ - name : Login to Container Registry ghcr.io
117+ uses : docker/login-action@v2
118+ with :
119+ registry : ghcr.io
120+ username : ${{ github.actor }}
121+ password : ${{ secrets.GITHUB_TOKEN }}
122+
91123 - name : Delete old versions of the package, keeping a few of the newest
92124 uses : actions/delete-package-versions@v4
93125 with :
You can’t perform that action at this time.
0 commit comments