Skip to content

chore: trying another way to get the tag #413

chore: trying another way to get the tag

chore: trying another way to get the tag #413

Workflow file for this run

name: Build cht-sync containers
on:
push:
branches:
- fix-docker-hub-ci-upload
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: |
LATEST_TAG=$(curl -sL https://api.github.com/repos/medic/cht-sync/releases/latest | jq -r '.tag_name')
echo "RELEASE_TAG=$LATEST_TAG" >> $GITHUB_ENV
- 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 }}
- 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 }}