File tree Expand file tree Collapse file tree 2 files changed +51
-3
lines changed
Expand file tree Collapse file tree 2 files changed +51
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Publish Latest Docker Image
33on :
44 push :
55 branches :
6- - ' main '
6+ - ' 8.1.x '
77
88env :
99 PHP_VERSION : ' 8.1'
@@ -34,13 +34,13 @@ jobs:
3434 with :
3535 context : ./cli
3636 push : true
37- tags : ${{ env.DOCKER_HUB_REPO }}:latest-cli
37+ tags : ${{ env.DOCKER_HUB_REPO }}:latest-${{ env.PHP_VERSION }}- cli
3838 labels : ${{ steps.meta.outputs.labels }}
3939
4040 - name : Build and push FPM image
4141 uses : docker/build-push-action@v2
4242 with :
4343 context : ./fpm
4444 push : true
45- tags : ${{ env.DOCKER_HUB_REPO }}:latest-fpm
45+ tags : ${{ env.DOCKER_HUB_REPO }}:latest-${{ env.PHP_VERSION }}- fpm
4646 labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1+ name : Publish Released Docker Image
2+
3+ on :
4+ release :
5+ types :
6+ - published
7+ branches :
8+ - ' 8.1.x'
9+
10+ env :
11+ PHP_VERSION : ' 8.1'
12+ DOCKER_HUB_REPO : ' rushlowdev/php-cli'
13+
14+ jobs :
15+ push_to_registry :
16+ name : Push Released PHP Images to Docker Hub
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Check out the repo
20+ uses : actions/checkout@v2
21+
22+ - name : Log in to Docker Hub
23+ uses : docker/login-action@v1
24+ with :
25+ username : ${{ secrets.DOCKER_HUB_USER }}
26+ password : ${{ secrets.DOCKER_HUB_TOKEN }}
27+
28+ - name : Extract metadata (tags, labels) for Docker
29+ id : meta
30+ uses : docker/metadata-action@v3
31+ with :
32+ images : rushlowdev/php-cli
33+
34+ - name : Build and push CLI image
35+ uses : docker/build-push-action@v2
36+ with :
37+ context : ./cli
38+ push : true
39+ tags : ${{ env.DOCKER_HUB_REPO }}:${{ env.PHP_VERSION }}-cli
40+ labels : ${{ steps.meta.outputs.labels }}
41+
42+ - name : Build and push FPM image
43+ uses : docker/build-push-action@v2
44+ with :
45+ context : ./fpm
46+ push : true
47+ tags : ${{ env.DOCKER_HUB_REPO }}:${{ env.PHP_VERSION }}-fpm
48+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments