Skip to content

Commit 65c5490

Browse files
committed
update ci
1 parent 91f6d8e commit 65c5490

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/dockerimage.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,27 @@ jobs:
2020
- name: Checkout
2121
uses: actions/checkout@v2
2222

23+
- name: Docker meta
24+
id: meta
25+
uses: crazy-max/ghaction-docker-meta@v2
26+
with:
27+
images:
28+
laradock/php-fpm
29+
flavor: |
30+
suffix=-${{ matrix.php_version }}
31+
tags: |
32+
type=ref,event=branch
33+
type=ref,event=tag
34+
type=raw,value=latest
35+
2336
- name: Set up QEMU
2437
uses: docker/setup-qemu-action@v1
2538

2639
- name: Set up Docker Buildx
2740
uses: docker/setup-buildx-action@v1
2841

2942
- name: Login to Docker Hub
43+
if: ${{ (github.repository == 'laradock/php-fpm') && (github.ref == 'refs/heads/master') }}
3044
uses: docker/login-action@v1
3145
with:
3246
username: ${{ secrets.DOCKER_HUB_USER }}
@@ -37,8 +51,8 @@ jobs:
3751
with:
3852
file: Dockerfile-${{ matrix.php_version }}
3953
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
40-
push: (${{ (github.repository == 'laradock/php-fpm') && (github.ref == 'refs/heads/master') }})
41-
tags: laradock/php-fpm:${{ env.TAG_PREFIX }}-${{ matrix.php_version }}
54+
push: ${{ (github.repository == 'laradock/php-fpm') && (github.ref == 'refs/heads/master') }}
55+
tags: ${{ steps.meta.outputs.tags }}
4256

4357
- name: check
4458
run: |

0 commit comments

Comments
 (0)