Set the minimum app version #142
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
name: production | |
## DEPLOY TAG FOR WIZARD IS SET MANUAL IN THE HELM FILES -> TODO | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to docker hub | |
run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_TOKEN }} | |
- name: Set config | |
run: mv frontend/public/config.prod.js frontend/public/config.js | |
- name: Build the Docker image | |
run: docker build . --file Dockerfile --tag jimber/3botlogin:production-${{ github.sha }} | |
- name: Push the Docker image | |
run: docker push jimber/3botlogin:production-${{ github.sha }} | |
# deploy: | |
# needs: build | |
# runs-on: whale-replacement | |
# steps: | |
# - name: Login to docker hub | |
# run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_TOKEN }} | |
# - name: kill old docker | |
# run: docker rm -f 3botlogin || true | |
# - name: Pull Image | |
# run: docker pull jimber/3botlogin:production-${{ github.sha }} | |
# - name: Run new docker | |
# run: docker run -d -it --restart=unless-stopped --name 3botlogin -v /opt/3botlogin/db/pythonsqlite.db:/usr/share/nginx/backend/pythonsqlite.db -v /opt/3botlogin/config.ini:/usr/share/nginx/backend/config.ini --network=3proxynet jimber/3botlogin:production-${{ github.sha }} | |
deploy: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set authorization certificate | |
run: | | |
mkdir ${HOME}/.kube | |
echo ${{ secrets.KUBE_KEY }} | base64 --decode > ${HOME}/.kube/jimber-prod2.key | |
echo ${HOME}/.kube/jimber-prod2.key | |
echo ${{ secrets.KUBE_CRT }} | base64 --decode > ${HOME}/.kube/jimber-prod2.crt | |
echo ${HOME}/.kube/jimber-prod2.crt | |
- name: context | |
run: | | |
echo ${{ secrets.KUBE_CONFIG }} | base64 --decode > ${HOME}/.kube/config | |
- name: Upgrade production on cluster | |
run: | | |
echo production-${{ github.sha }} | |
helm upgrade threebotlogin helm_files -f helm_files/valuesProduction.yaml --set images.login.tag=production-${{ github.sha }} -n jimber |