Skip to content

Merge branch 'develop' into ui-update-with-graphics #35

Merge branch 'develop' into ui-update-with-graphics

Merge branch 'develop' into ui-update-with-graphics #35

Workflow file for this run

name: Build PatientPortal API docker image
on:
push:
tags:
- v*
branches:
- '**' # any branch
# - '!master' # not master
paths:
- 'patient-portal/**'
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
name: Build and push docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup image repo
shell: bash
run: |
build_id=$(echo "${GITHUB_REF}" | sed "s#^\([^/]*[/]\)\{2\}##g" | tr "/" "-")
echo BUILD_ID=${build_id} >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/informatici/oh-patient-portal/ohpp-api
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./patient-portal
file: ./patient-portal/Dockerfile
build-args: |
"BUILD_ID=${{ env.BUILD_ID }}"
push: true
pull: true
cache-from: type=registry,ref=ghcr.io/informatici/oh-patient-portal/ohpp-api:buildcache
cache-to: type=registry,ref=ghcr.io/informatici/oh-patient-portal/ohpp-api:buildcache,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}