Skip to content

Commit eae1de0

Browse files
author
Kevin Buchholz
committed
using docker metadata
1 parent e04b6db commit eae1de0

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/imagebuild.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@ jobs:
1111
-
1212
name: Checkout
1313
uses: actions/checkout@v2
14+
-
15+
name: Docker meta
16+
id: meta
17+
uses: docker/metadata-action@v3
18+
with:
19+
# list of Docker images to use as base name for tags
20+
images: |
21+
neroazure/docker-laravel
22+
# generate Docker tags based on the following events/attributes
23+
tags: |
24+
type=ref,event=branch
25+
type=semver,pattern={{version}}
26+
type=semver,pattern={{major}}.{{minor}}
27+
type=semver,pattern={{major}}
1428
-
1529
name: Set up QEMU
1630
uses: docker/setup-qemu-action@v1
@@ -39,6 +53,4 @@ jobs:
3953
push: true
4054
# ghcr.io/user/app:1.0.0
4155
# ghcr.io/user/app:latest
42-
tags: |
43-
${{ github.repository }}-test:latest
44-
${{ github.repository }}-test:${{ join(github.event.push.branches.*.name, ', ') }}
56+
tags: ${{ steps.meta.outputs.tags }}

0 commit comments

Comments
 (0)