Update README.md #8
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:]') | |
DATAMANAGEMENT_TAG=$RELEASE-$VERSION.$BUILD.$FIX-Datamanagement | |
LABELSTUDIO_TAG=$RELEASE-$VERSION.$BUILD.$FIX-Labelstudio | |
MLSTUDIO_TAG=$RELEASE-$VERSION.$BUILD.$FIX-MLstudio | |
ANONYMISEWORKER_TAG=$RELEASE-$VERSION.$BUILD.$FIX-Anonymiseworker | |
ANONYMISE_TAG=$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 "DATAMANAGEMENT_TAG=$DATAMANAGEMENT_TAG" >> $GITHUB_ENV | |
echo "LABELSTUDIO_TAG=$LABELSTUDIO_TAG" >> $GITHUB_ENV | |
echo "MLSTUDIO_TAG=$MLSTUDIO_TAG" >> $GITHUB_ENV | |
echo "ANONYMISEWORKER_TAG=$ANONYMISEWORKER_TAG" >> $GITHUB_ENV | |
echo "ANONYMISE_TAG=$ANONYMISE_TAG" >> $GITHUB_ENV | |
- name: Login to GitHub Container Registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_ACTOR --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/buerokratt/data-anonymizer:$DATAMANAGEMENT_TAG -f Dockerfile . | |
docker push ghcr.io/buerokratt/data-anonymizer:$DATAMANAGEMENT_TAG | |
- name: Build and Push Labelstudio Docker Image | |
run: | | |
cd Docker_Project/Label-Studio | |
docker image build --tag ghcr.io/buerokratt/data-anonymizer:$LABELSTUDIO_TAG -f Dockerfile . | |
docker push ghcr.io/buerokratt/data-anonymizer:$LABELSTUDIO_TAG | |
- name: Build and Push MLstudio Docker Image | |
run: | | |
cd Docker_Project/ml-training-service | |
docker image build --tag ghcr.io/buerokratt/data-anonymizer:$MLSTUDIO_TAG -f Dockerfile . | |
docker push ghcr.io/buerokratt/data-anonymizer:$MLSTUDIO_TAG | |
- name: Build and Push Anonymiseworker Docker Image | |
run: | | |
cd Docker_Project/anonymisation_internal/anonymisation_api/ | |
docker image build --tag ghcr.io/buerokratt/data-anonymizer:$ANONYMISEWORKER_TAG -f Dockerfile . | |
docker push ghcr.io/buerokratt/data-anonymizer:$ANONYMISEWORKER_TAG | |
- name: Build and Push Anonymise Docker Image | |
run: | | |
cd Docker_Project/anonymisation_internal/anonymisation_api/anonymise | |
docker image build --tag ghcr.io/buerokratt/data-anonymizer:$ANONYMISE_TAG -f Dockerfile . | |
docker push ghcr.io/buerokratt/data-anonymizer:$ANONYMISE_TAG |