File tree Expand file tree Collapse file tree 2 files changed +82
-0
lines changed
Expand file tree Collapse file tree 2 files changed +82
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Main Branch CI Image Build
2+ on :
3+ push :
4+ branches : main
5+ jobs :
6+ build-image :
7+ name : Build and push Docker image
8+ runs-on : ubuntu-latest
9+ env :
10+ GHCR_PAT : ${{secrets.GHCR_PAT}}
11+ steps :
12+ - name : Checkout repository
13+ uses : actions/checkout@v4
14+ with :
15+ ref : ${{ github.event.pull_request.head.sha }}
16+ - name : Docker meta
17+ id : meta
18+ uses : docker/metadata-action@v5
19+ with :
20+ images : |
21+ ghcr.io/digiblink/bullseye-nginx-php5-fpm
22+ tags : |
23+ type=sha,prefix=
24+ flavor : |
25+ latest=true
26+ prefix=
27+ suffix=
28+ labels : |
29+ org.opencontainers.image.vendor=digiBlink
30+ - name : Login to Github Packages
31+ uses : docker/login-action@v3
32+ with :
33+ registry : ghcr.io
34+ username : ${{ github.actor }}
35+ password : ${{ secrets.GHCR_PAT }}
36+ - name : Build image and push to GitHub Container Registry
37+ uses : docker/build-push-action@v6
38+ with :
39+ push : true
40+ tags : ${{ steps.meta.outputs.tags }}
41+ labels : ${{ steps.meta.outputs.labels }}
42+ - name : Image digest
43+ run : echo ${{ steps.docker_build.outputs.digest }}
Original file line number Diff line number Diff line change 1+ name : PR CI Image Build
2+ on : pull_request
3+ jobs :
4+ build-image :
5+ name : Build Docker and push image
6+ runs-on : ubuntu-latest
7+ env :
8+ GHCR_PAT : ${{secrets.GHCR_PAT}}
9+ steps :
10+ - name : Checkout repository
11+ uses : actions/checkout@v4
12+ with :
13+ ref : ${{ github.event.pull_request.head.sha }}
14+ - name : Docker meta
15+ id : meta
16+ uses : docker/metadata-action@v5
17+ with :
18+ images : |
19+ ghcr.io/digiblink/bullseye-nginx-php5-fpm
20+ tags : |
21+ type=sha,prefix=pr-
22+ flavor : |
23+ latest=false
24+ prefix=
25+ suffix=
26+ labels : |
27+ org.opencontainers.image.vendor=digiBlink
28+ - name : Login to Github Packages
29+ uses : docker/login-action@v3
30+ with :
31+ registry : ghcr.io
32+ username : ${{ github.actor }}
33+ password : ${{ secrets.GHCR_PAT }}
34+ - name : Build image and push to GitHub Container Registry
35+ uses : docker/build-push-action@v6
36+ with :
37+ push : true
38+ tags : ${{ steps.meta.outputs.tags }}
39+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments