Skip to content

Commit

Permalink
Update build file to push docker image only on release
Browse files Browse the repository at this point in the history
Fix #913
  • Loading branch information
kartiktayal committed Aug 20, 2023
1 parent 3b7855f commit 80f3947
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,32 @@
#
name: Build
on:
push:
branches:
- master
release:
types: [released]

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
apache/eventmesh
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
push: true
tags: eventmesh/eventmesh:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./docker/Dockerfile
context: ./

0 comments on commit 80f3947

Please sign in to comment.