Skip to content

Commit

Permalink
[ISSUE #913] Push docker image to apache repo (#4282)
Browse files Browse the repository at this point in the history
* Update build file to push docker image only on release

Fix #913

* Update build.yaml

---------

Co-authored-by: mike_xwm <[email protected]>
  • Loading branch information
kartiktayal and xwm1992 committed Nov 15, 2023
1 parent 13f4d98 commit 709b211
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 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 }}
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- 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 709b211

Please sign in to comment.