Skip to content

Commit

Permalink
chore(#72): github action for building and pushing docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
njogz authored Apr 20, 2023
1 parent 0b46fad commit df8c720
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CHT interoperability mediator docker build

on:
push:
branches:
- 'main'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Build timestamp
id: timestamp
run: echo "BUILD_TIMESTAMP=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV

- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push openhim-mediator
uses: docker/build-push-action@v4
with:
push: true
tags: medicmobile/openhim-mediator:${{ env.BUILD_TIMESTAMP }}

0 comments on commit df8c720

Please sign in to comment.