This repository was archived by the owner on Oct 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8080 host : ${{ secrets.AWS_STAGING_HOST }}
8181 username : ec2-user
8282 key : ${{ secrets.AWS_HUBBLE_CONSUMER_BACKEND_SSH_KEY }}
83+ script_stop : true
8384 script : |
8485 cd deployment/
8586 docker-compose pull
Original file line number Diff line number Diff line change 8080 host : ec2-3-237-17-229.compute-1.amazonaws.com
8181 username : ec2-user
8282 key : ${{ secrets.AWS_SSH_KEY }}
83+ script_stop : true
8384 script : |
8485 docker-compose pull
8586 docker-compose up -d
Original file line number Diff line number Diff line change 1- name : E2E Test
1+ name : Release
22on :
33 release :
44 types : [created]
2828 file : ./Dockerfile
2929 push : true
3030 tags : ghcr.io/worldcoin/hubble-commander:${{ steps.tag_name.outputs.SOURCE_TAG }},ghcr.io/worldcoin/hubble-commander:stable
31-
32- deploy-backend-api-staging :
33- runs-on : ubuntu-20.04
34- needs : [build]
35- steps :
36- - name : Configure AWS EKS credentials
37- uses : aws-actions/configure-aws-credentials@v1
38- with :
39- aws-access-key-id : ${{ secrets.STAGING_BACKEND_API_AWS_ACCESS_KEY_ID }}
40- aws-secret-access-key : ${{ secrets.STAGING_BACKEND_API_AWS_SECRET_ACCESS_KEY }}
41- aws-region : us-east-1
42- - name : Download kubeconfig
43- run : |
44- aws eks --region us-east-1 update-kubeconfig --name new-staging --kubeconfig $GITHUB_WORKSPACE/kubeconfig
45- - name : Install kubectl
46- run : |
47- curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
48- chmod +x ./kubectl
49- - name : Set tag name
50- id : tag_name
51- run : |
52- echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
53- - name : Update deployment in the cluster
54- run : |
55- ./kubectl --kubeconfig ./kubeconfig --namespace=staging set image deployments/hubble-commander primary-hubble-commander=ghcr.io/worldcoin/hubble-commander:${{ steps.tag_name.outputs.SOURCE_TAG }} secondary-hubble-commander=ghcr.io/worldcoin/hubble-commander:${{ steps.tag_name.outputs.SOURCE_TAG }}
56-
57- deploy :
58- name : Deploy to AWS
59- needs : build
60- runs-on : ubuntu-20.04
61- strategy :
62- matrix :
63- host : [ec2-3-238-223-141.compute-1.amazonaws.com, ec2-3-239-149-30.compute-1.amazonaws.com]
64- steps :
65- - name : Deploy to AWS
66- uses : appleboy/ssh-action@master
67- with :
68- host : ${{ matrix.host }}
69- username : ec2-user
70- key : ${{ secrets.AWS_SSH_KEY }}
71- script : |
72- docker-compose pull
73- docker-compose up -d
74- docker images -f "before=ghcr.io/worldcoin/hubble-commander:stable" -f "dangling=true" -q ghcr.io/worldcoin/hubble-commander | xargs docker image rm || true
You can’t perform that action at this time.
0 commit comments