Skip to content

Commit

Permalink
Optimize docker build & push pipeline (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
feedmeapples authored Jan 29, 2022
1 parent c0f11a1 commit dfe813d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ on:
push:
branches:
- main
tags:
- "v*"
release:
types:
- created

jobs:
publish_to_docker_hub:
Expand All @@ -28,6 +29,7 @@ jobs:
- name: Docker meta for Commit image
id: meta_commit
uses: docker/metadata-action@v3
if: github.event_name == 'push'
with:
images: temporaliotest/ui
tags: |
Expand All @@ -36,15 +38,17 @@ jobs:
- name: Push Commit image to DockerHub
uses: docker/build-push-action@v2
if: github.event_name == 'push'
with:
push: ${{ github.event_name == 'push' }}
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta_commit.outputs.tags }}
labels: ${{ steps.meta_commit.outputs.labels }}

- name: Docker meta for Release image
id: meta_release
uses: docker/metadata-action@v3
if: github.event_name == 'release'
with:
images: temporalio/ui
tags: |
Expand All @@ -53,8 +57,9 @@ jobs:
- name: Push Release image to DockerHub
uses: docker/build-push-action@v2
if: github.event_name == 'release'
with:
push: ${{ github.event_name == 'release' }}
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta_release.outputs.tags }}
labels: ${{ steps.meta_release.outputs.labels }}

0 comments on commit dfe813d

Please sign in to comment.