|
16 | 16 | branches: [development] |
17 | 17 |
|
18 | 18 | env: |
19 | | - PROJECT_ID: ${{ secrets.GKE_PROJECT }} |
20 | | - GKE_CLUSTER_DEV: nmrxiv-dev |
21 | | - GKE_ZONE: europe-west3-a |
22 | 19 | DEPLOYMENT_NAME: nmrxiv-nmrium |
23 | 20 | DOCKER_HUB_USERNAME : ${{ secrets.DOCKER_HUB_USERNAME }} |
24 | 21 | DOCKER_HUB_PASSWORD : ${{ secrets.DOCKER_HUB_PASSWORD }} |
|
46 | 43 | VERSION=${GITHUB_REF//*\/} |
47 | 44 | echo "export default { version: '$VERSION' };" > src/versionInfo.ts |
48 | 45 |
|
49 | | - # Setup gcloud CLI |
50 | | - - name: Setup CLI |
51 | | - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 |
52 | | - with: |
53 | | - service_account_key: ${{ secrets.GKE_SA_KEY }} |
54 | | - project_id: ${{ secrets.GKE_PROJECT }} |
55 | | - |
56 | | - # Get the GKE credentials so we can deploy to the cluster |
57 | | - - name: Get GKE credentials |
58 | | - uses: google-github-actions/[email protected] |
59 | | - with: |
60 | | - cluster_name: ${{ env.GKE_CLUSTER_DEV }} |
61 | | - location: ${{ env.GKE_ZONE }} |
62 | | - credentials: ${{ secrets.GKE_SA_KEY }} |
63 | | - |
64 | 46 | - name: Log in to Docker Hub |
65 | 47 | uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a |
66 | 48 | with: |
|
78 | 60 | tags: ${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:dev-latest |
79 | 61 | username: ${{ env.DOCKER_HUB_USERNAME }} |
80 | 62 | password: ${{ env.DOCKER_HUB_PASSWORD }} |
81 | | - |
82 | | - # Deploy the latest Docker image to the GKE cluster |
83 | | - - name: Deploy |
84 | | - run: |- |
85 | | - kubectl rollout restart deployment/$DEPLOYMENT_NAME |
86 | | - kubectl rollout status deployment/$DEPLOYMENT_NAME --timeout=300s |
87 | | - kubectl get services -o wide |
0 commit comments