Skip to content

Commit

Permalink
chore(CI): docker build
Browse files Browse the repository at this point in the history
Signed-off-by: Bo-Yi.Wu <[email protected]>
  • Loading branch information
appleboy committed Dec 24, 2022
1 parent b128f14 commit bff0f2d
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ jobs:

-
name: Docker meta for linux amd64
if: github.event_name == 'push'
id: meta-linux-amd64
uses: docker/metadata-action@v4
with:
Expand All @@ -67,22 +66,23 @@ jobs:
tags: |
type=raw,value=
type=raw,value=latest,suffix=
type=semver,event=tag,pattern={{version}},suffix=-linux-amd64
type=semver,event=tag,pattern={{major}}.{{minor}},suffix=-linux-amd64
type=semver,event=tag,pattern={{major}},suffix=-linux-amd64
-
name: Build and push linux amd64
if: github.event_name == 'push'
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile.linux.amd64
platforms: linux/amd64
push: ${{ github.event_name == 'push' }}
push: true
tags: ${{ steps.meta-linux-amd64.outputs.tags }}
labels: ${{ steps.meta-linux-amd64.outputs.labels }}

-
name: Docker meta for linux arm64
if: github.event_name == 'push'
id: meta-linux-arm64
uses: docker/metadata-action@v4
with:
Expand All @@ -94,22 +94,23 @@ jobs:
ghcr.io/appleboy/gorush
tags: |
type=raw,value=
type=semver,event=tag,pattern={{version}},suffix=-linux-arm64
type=semver,event=tag,pattern={{major}}.{{minor}},suffix=-linux-arm64
type=semver,event=tag,pattern={{major}},suffix=-linux-arm64
-
name: Build and push linux arm64
if: github.event_name == 'push'
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile.linux.arm64
platforms: linux/arm64
push: ${{ github.event_name == 'push' }}
push: true
tags: ${{ steps.meta-linux-arm64.outputs.tags }}
labels: ${{ steps.meta-linux-arm64.outputs.labels }}

-
name: Docker meta for linux arm
if: github.event_name == 'push'
id: meta-linux-arm
uses: docker/metadata-action@v4
with:
Expand All @@ -121,15 +122,17 @@ jobs:
ghcr.io/appleboy/gorush
tags: |
type=raw,value=
type=semver,event=tag,pattern={{version}},suffix=-linux-arm
type=semver,event=tag,pattern={{major}}.{{minor}},suffix=-linux-arm
type=semver,event=tag,pattern={{major}},suffix=-linux-arm
-
name: Build and push linux arm
if: github.event_name == 'push'
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile.linux.arm
platforms: linux/arm
push: ${{ github.event_name == 'push' }}
push: true
tags: ${{ steps.meta-linux-arm.outputs.tags }}
labels: ${{ steps.meta-linux-arm.outputs.labels }}

0 comments on commit bff0f2d

Please sign in to comment.