Skip to content

Merge pull request #2212 from fli-iam/develop #65

Merge pull request #2212 from fli-iam/develop

Merge pull request #2212 from fli-iam/develop #65

Workflow file for this run

# Create a Docker image for each microservice in Shanoir
name: Publish Docker images
env:
REGISTRY: ghcr.io
IMAGE_NAME: ghcr.io/${{ github.repository }}
TAG: ${{ github.ref_name }}
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
push_to_registry:
name: Push Docker images to Container registry
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Check out the repo
uses: actions/checkout@v3
- name: Create directory /shanoir-ng-logs
run: sudo mkdir -m777 /var/log/shanoir-ng-logs
- name: Maven build
run: mvn -f ./shanoir-ng-parent/pom.xml install -DskipTests
env:
SHANOIR_URL_HOST: localhost
SHANOIR_URL_SCHEME: http
SHANOIR_PREFIX: github
SHANOIR_ADMIN_EMAIL: [email protected]
SHANOIR_KEYCLOAK_USER: admin
SHANOIR_KEYCLOAK_PASSWORD: '&a1A&a1A'
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: USERS - Build & push Docker image
uses: docker/build-push-action@v2
with:
context: ./docker-compose/users
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ env.IMAGE_NAME }}/users:latest, ${{ env.IMAGE_NAME }}/users:${{ env.TAG }}
- name: STUDIES - Build & push Docker image
uses: docker/build-push-action@v2
with:
context: ./docker-compose/studies
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ env.IMAGE_NAME }}/studies:latest, ${{ env.IMAGE_NAME }}/studies:${{ env.TAG }}
- name: IMPORT - Build & push Docker image
uses: docker/build-push-action@v2
with:
context: ./docker-compose/import
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ env.IMAGE_NAME }}/import:latest, ${{ env.IMAGE_NAME }}/import:${{ env.TAG }}
- name: DATASETS - Build & push Docker image
uses: docker/build-push-action@v2
with:
context: ./docker-compose/datasets
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ env.IMAGE_NAME }}/datasets:latest, ${{ env.IMAGE_NAME }}/datasets:${{ env.TAG }}
- name: PRECLINICAL - Build & push Docker image
uses: docker/build-push-action@v2
with:
context: ./docker-compose/preclinical
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ env.IMAGE_NAME }}/preclinical:latest, ${{ env.IMAGE_NAME }}/preclinical:${{ env.TAG }}
- name: NGINX - Build & push Docker image
uses: docker/build-push-action@v2
with:
context: ./docker-compose/nginx
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ env.IMAGE_NAME }}/nginx:latest, ${{ env.IMAGE_NAME }}/nginx:${{ env.TAG }}