Update appsettings.json #421
Workflow file for this run
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
# Builds and deploys Docker image to Docker hub when a new tag/release is created | |
name: Builds and publishes new Docker images to Docker hub when a new tag is created | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get tag version number | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: Build and push Docker CI images backend/frontend/expert-ai | |
run: | | |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | |
cd ./frontend | |
docker build -t servergardens/magic-frontend:latest -f ./Dockerfile . | |
docker build -t servergardens/magic-frontend:${{ steps.get_version.outputs.VERSION }} -f ./Dockerfile . | |
docker push servergardens/magic-frontend:latest | |
docker push servergardens/magic-frontend:${{ steps.get_version.outputs.VERSION }} | |
cd .. | |
cd ./backend | |
docker build -t servergardens/magic-backend:${{ steps.get_version.outputs.VERSION }} -f ./Dockerfile . | |
docker push servergardens/magic-backend:${{ steps.get_version.outputs.VERSION }} | |
dotnet remove reference magic.lambda.system | |
docker build -t servergardens/magic-backend:min-${{ steps.get_version.outputs.VERSION }} -f ./Dockerfile . | |
docker push servergardens/magic-backend:min-${{ steps.get_version.outputs.VERSION }} | |
cd ./files/etc/www/ | |
mkdir tmp | |
cd tmp | |
git clone https://github.com/polterguy/expert-ai.git | |
cd ./expert-ai | |
npm install | |
npm install -g @angular/cli@latest | |
npm run build-prod | |
cd ./dist | |
cd ./frontend | |
cp -r * ../../../../ | |
cd .. | |
cd .. | |
cd .. | |
cd .. | |
rm -rf ./tmp | |
ls | |
cd .. | |
cd .. | |
cd .. | |
cd .. | |
zip -r magic-${{ steps.get_version.outputs.VERSION }}.zip * | |
curl -X PUT -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ secrets.API_TOKEN }}" -F "folder=/etc/releases/" -F "file=@magic-${{ steps.get_version.outputs.VERSION }}.zip" "https://ainiro.io/magic/system/file-system/file" | |