Skip to content

Version 2.4.0 (supporting Translator 3.7.1) #19

Version 2.4.0 (supporting Translator 3.7.1)

Version 2.4.0 (supporting Translator 3.7.1) #19

# Whenever a new release is published, this action will build a new Docker image
# and push it to DockerHub. This action is based on the following documentation:
# https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
# https://github.com/docker/build-push-action/blob/master/docs/advanced/dockerhub-desc.md
name: Publish Docker image
on:
pull_request:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: cqframework/cql-translation-service
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
-
if: github.event_name == 'release'
name: Update repo description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: cqframework/cql-translation-service