Skip to content

Merge pull request #225 from os2display/feature/adr #78

Merge pull request #225 from os2display/feature/adr

Merge pull request #225 from os2display/feature/adr #78

---
on:
push:
branches:
- 'develop'
# This Action builds to itkdev/* using ./infrastructure/itkdev/*
name: ITK Dev - Build docker image (develop)
jobs:
docker:
runs-on: ubuntu-latest
env:
APP_VERSION: develop
COMPOSER_ALLOW_SUPERUSER: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Build api
- name: Docker meta (API)
id: meta-api
uses: docker/metadata-action@v5
with:
images: itkdev/os2display-api-service
- name: Build and push (API)
uses: docker/build-push-action@v5
with:
context: ./infrastructure/itkdev/display-api-service/
file: ./infrastructure/itkdev/display-api-service/Dockerfile
build-args: |
VERSION=${{ env.APP_VERSION }}
push: true
tags: ${{ steps.meta-api.outputs.tags }}
labels: ${{ steps.meta-api.outputs.labels }}
# Build nginx (depends on api build)
- name: Docker meta (Nginx)
id: meta-nginx
uses: docker/metadata-action@v5
with:
images: itkdev/os2display-api-service-nginx
- name: Build and push (Nginx)
uses: docker/build-push-action@v5
with:
context: ./infrastructure/itkdev/nginx/
file: ./infrastructure/itkdev/nginx/Dockerfile
build-args: |
APP_VERSION=${{ env.APP_VERSION }}
push: true
tags: ${{ steps.meta-nginx.outputs.tags }}
labels: ${{ steps.meta-nginx.outputs.labels }}