Skip to content

Merge branch 'develop' #5

Merge branch 'develop'

Merge branch 'develop' #5

---
on:
push:
tags:
- '*'
# This Action builds to itkdev/* using ./infrastructure/itkdev/*
name: ITK Dev - Build docker image (tag)
jobs:
docker:
runs-on: ubuntu-latest
env:
COMPOSER_ALLOW_SUPERUSER: 1
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Build api
- name: Docker meta (API)
id: meta-api
uses: docker/metadata-action@v4
with:
images: itkdev/os2display-api-service
- name: Build and push (API)
uses: docker/build-push-action@v4
with:
context: ./infrastructure/itkdev/display-api-service/
file: ./infrastructure/itkdev/display-api-service/Dockerfile
build-args: |
APP_VERSION=${{ github.ref }}
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@v4
with:
images: itkdev/os2display-api-service-nginx
- name: Get the tag
id: get_tag
run: echo ::set-output name=git_tag::$(echo $GITHUB_REF_NAME)
- name: Build and push (Nginx)
uses: docker/build-push-action@v4
with:
context: ./infrastructure/itkdev/nginx/
file: ./infrastructure/itkdev/nginx/Dockerfile
build-args: |
APP_VERSION=${{ steps.get_tag.outputs.git_tag }}
push: true
tags: ${{ steps.meta-nginx.outputs.tags }}
labels: ${{ steps.meta-nginx.outputs.labels }}