|
8 | 8 | build: |
9 | 9 | runs-on: ubuntu-latest |
10 | 10 | steps: |
11 | | -# - uses: actions/checkout@v1 |
12 | | -# - uses: actions/setup-java@v1 |
13 | | -# with: |
14 | | -# java-version: '12.x' |
15 | | - |
16 | | -# # Setup the flutter environment. |
17 | | -# - uses: subosito/flutter-action@v1 |
18 | | -# with: |
19 | | -# channel: 'stable' # 'dev', 'alpha', default to: 'stable' |
20 | | -# flutter-version: '2.10.1' # you can also specify exact version of flutter |
21 | | - |
22 | | -# # Get flutter dependencies. |
23 | | -# - run: cd app && flutter pub get |
24 | | - |
25 | | -# # Check for any formatting issues in the code. |
26 | | -# - run: flutter format --set-exit-if-changed . |
27 | | - |
28 | | -# # Statically analyze the Dart code for any errors. |
29 | | -# - run: flutter analyze . |
30 | | - |
31 | | -# # Build apk. |
32 | | -# - run: flutter build apk |
33 | | - |
34 | | -# # Upload generated apk to the artifacts. |
35 | | -# - uses: actions/upload-artifact@v1 |
36 | | -# with: |
37 | | -# name: release-apk |
38 | | -# path: app/apks/app-release.apk |
39 | | - |
40 | 11 | - uses: actions/checkout@v2 |
41 | | - - name: Login to docker hub |
42 | | - run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_TOKEN }} |
| 12 | + - name: Log into Docker Hub |
| 13 | + uses: docker/login-action@v2 |
| 14 | + with: |
| 15 | + username: ${{ secrets.TFDOCKERHUB_USERNAME }} |
| 16 | + password: ${{ secrets.TFDOCKERHUB_PASSWORD }} |
| 17 | + |
43 | 18 | - name: Set config |
44 | 19 | run: mv frontend/public/config.staging.js frontend/public/config.js |
45 | | - - name: Build the Docker image |
46 | | - run: docker build . --file Dockerfile --tag jimber/3botlogin:staging-${{ github.sha }} |
47 | | - - name: Push the Docker image |
48 | | - run: docker push jimber/3botlogin:staging-${{ github.sha }} |
49 | | - |
| 20 | + - name: Build the 3botlogin Docker image |
| 21 | + run: docker build . --file Dockerfile --tag threefolddev/3botlogin:staging-${{ github.sha }} |
| 22 | + - name: Push the 3botlogin Docker image |
| 23 | + run: docker push threefolddev/3botlogin:staging-${{ github.sha }} |
| 24 | + - name: Build wizard Docker image |
| 25 | + run: docker build wizard/ --file wizard/Dockerfile --tag threefolddev/wizard:staging-${{ github.sha }} |
| 26 | + - name: Push wizard Docker image |
| 27 | + run: docker push threefolddev/wizard:staging-${{ github.sha }} |
| 28 | + |
50 | 29 | deploy: |
51 | | - needs: build |
52 | | - runs-on: tfc-connect-staging |
| 30 | + needs: [build] |
| 31 | + runs-on: ubuntu-latest |
53 | 32 | steps: |
54 | | - - name: Login to docker hub |
55 | | - run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_TOKEN }} |
56 | | - - name: kill old docker |
57 | | - run: docker rm -f 3botlogin || true |
58 | | - - name: Pull Image |
59 | | - run: docker pull jimber/3botlogin:staging-${{ github.sha }} |
60 | | - - name: Run new docker |
61 | | - run: docker run -d -it --restart=unless-stopped --name 3botlogin -v /opt/3botlogin/pythonsqlite.db:/usr/share/nginx/backend/pythonsqlite.db -v /opt/3botlogin/config.ini:/usr/share/nginx/backend/config.ini --network=proxy jimber/3botlogin:staging-${{ github.sha }} |
| 33 | + - uses: actions/checkout@v2 |
| 34 | + - name: Set authorization certificate |
| 35 | + run: | |
| 36 | + mkdir ${HOME}/.kube |
| 37 | + echo ${{ secrets.TF_KUBE_CONFIG }} | base64 --decode > ${HOME}/.kube/config |
| 38 | + - name: Install or Upgrade production on cluster |
| 39 | + run: | |
| 40 | + helm upgrade threebotlogin --install helm_files -f helm_files/valuesStaging.yaml --set images.login.tag=staging-${{ github.sha }} --set images.wizard.tag=staging-${{ github.sha }} -n threefoldconnect-staging |
0 commit comments