Skip to content

Build cht-sync containers #439

Build cht-sync containers

Build cht-sync containers #439

Workflow file for this run

name: Build cht-sync containers
on:
workflow_run:
workflows: ["release"]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get the latest release tag
id: get_latest_release
run: |
API_RESPONSE=$(curl -sL https://api.github.com/repos/${{ github.repository }}/releases/latest)
LATEST_TAG=$(echo "$API_RESPONSE" | jq -r .tag_name)
if [ -z "$LATEST_TAG" ] || [ "$LATEST_TAG" = "null" ]; then
LATEST_TAG="latest"
fi
echo "RELEASE_TAG=$LATEST_TAG" >> $GITHUB_OUTPUT
- name: Build and push couch2pg
uses: docker/build-push-action@v4
with:
context: ./couch2pg
file: ./couch2pg/Dockerfile
push: true
tags: |
medicmobile/cht-sync-couch2pg:${{ steps.get_latest_release.outputs.RELEASE_TAG }}
medicmobile/cht-sync-couch2pg:latest
- name: Build and push dataemon
uses: docker/build-push-action@v4
with:
context: ./dbt
file: ./dbt/Dockerfile
push: true
tags: |
medicmobile/dataemon:${{ steps.get_latest_release.outputs.RELEASE_TAG }}
medicmobile/dataemon:latest