Update README.md #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish Docker Images | |
on: | |
push: | |
branches: | |
- dev | |
paths: | |
- 'README.md' | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set environment variables | |
run: | | |
RELEASE=1 | |
VERSION=0 | |
BUILD=0 | |
FIX=1 | |
GITHUB_REPOSITORY_NAME=$(echo $GITHUB_REPOSITORY | awk -F/ '{print $2}') | |
LOWER_CASE_GITHUB_REPOSITORY=$(echo "$GITHUB_REPOSITORY_NAME" | tr '[:upper:]' '[:lower:]') | |
TAG_Datamanagement=$RELEASE-$VERSION.$BUILD.$FIX-Datamanagement | |
TAG_Labelstudio=$RELEASE-$VERSION.$BUILD.$FIX-Labelstudio | |
TAG_MLstudio=$RELEASE-$VERSION.$BUILD.$FIX-MLstudio | |
TAG_Anonymiseworker=$RELEASE-$VERSION.$BUILD.$FIX-Anonymiseworker | |
TAG_Anonymise=$RELEASE-$VERSION.$BUILD.$FIX-Anonymise | |
echo "RELEASE=$RELEASE" >> $GITHUB_ENV | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "BUILD=$BUILD" >> $GITHUB_ENV | |
echo "FIX=$FIX" >> $GITHUB_ENV | |
echo "LOWER_CASE_GITHUB_REPOSITORY=$LOWER_CASE_GITHUB_REPOSITORY" >> $GITHUB_ENV | |
echo "TAG_Datamanagement=$TAG_Datamanagement" >> $GITHUB_ENV | |
echo "TAG_Labelstudio=$TAG_Labelstudio" >> $GITHUB_ENV | |
echo "TAG_MLstudio=$TAG_MLstudio" >> $GITHUB_ENV | |
echo "TAG_Anonymiseworker=$TAG_Anonymiseworker" >> $GITHUB_ENV | |
echo "TAG_Anonymise=$TAG_Anonymise" >> $GITHUB_ENV | |
- name: Login to GitHub Container Registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | |
- name: Check Dockerfile Path (Debug) | |
run: ls -l Docker_Project/dm | |
- name: Build and Push DM Docker Image | |
run: | | |
cd Docker_Project/dm | |
docker image build --tag ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}/datamanagement:$TAG_Datamanagement -f Dockerfile . | |
docker push ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}/datamanagement:$TAG_Datamanagement | |
- name: Build and Push Labelstudio Docker Image | |
run: | | |
cd Docker_Project/Label-Studio | |
docker image build --tag ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}/labelstudio:$TAG_Labelstudio -f Dockerfile . | |
docker push ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}/labelstudio:$TAG_Labelstudio | |
- name: Build and Push MLstudio Docker Image | |
run: | | |
cd Docker_Project/ml-training-service | |
docker image build --tag ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}/mlstudio:$TAG_MLstudio -f Dockerfile . | |
docker push ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}/mlstudio:$TAG_MLstudio | |
- name: Build and Push Anonymiseworker Docker Image | |
run: | | |
cd Docker_Project/anonymisation_internal/anonymisation_api/ | |
docker image build --tag ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}/anonymiseworker:$TAG_Anonymiseworker -f Dockerfile . | |
docker push ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}/anonymiseworker:$TAG_Anonymiseworker | |
- name: Build and Push Anonymise Docker Image | |
run: | | |
cd Docker_Project/anonymisation_internal/anonymisation_api/anonymise | |
docker image build --tag ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}/anonymise:$TAG_Anonymise -f Dockerfile . | |
docker push ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}/anonymise:$TAG_Anonymise |