Fix the action files #177
Workflow file for this run
This file contains hidden or 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: staging | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up environment variables | |
| run: | | |
| cat > frontend/.env << EOF | |
| VITE_API_URL=https://login.staging.threefold.me/ | |
| VITE_OPENKYC_URL=https://kyc.staging.threefold.me/ | |
| VITE_DEEPLINK=threebot-staging:// | |
| EOF | |
| - name: Build the 3botlogin Docker image | |
| run: docker build . --file Dockerfile --tag ghcr.io/${{ github.repository_owner }}/threefold-connect:staging-${{ github.sha }} | |
| - name: Push the 3botlogin Docker image | |
| run: docker push ghcr.io/${{ github.repository_owner }}/threefold-connect:staging-${{ github.sha }} | |
| deploy: | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set authorization certificate | |
| run: | | |
| mkdir ${HOME}/.kube | |
| echo ${{ secrets.TF_KUBE_CONFIG }} | base64 --decode > ${HOME}/.kube/config | |
| - name: Install or Upgrade production on cluster | |
| run: | | |
| helm upgrade threebotlogin --install helm_files -f helm_files/valuesStaging.yaml --set images.login.tag=staging-${{ github.sha }} --set images.login.repo=ghcr.io/${{ github.repository_owner }}/threefold-connect -n threefoldconnect-staging |