2020 GKE_CLUSTER_DEV : nmrxiv-dev
2121 GKE_ZONE : europe-west3-a
2222 DEPLOYMENT_NAME : nmrxiv-nmrium
23- REPOSITORY_NAME_DEV : nmrxiv-dev
24- IMAGE : nmrium
23+ DOCKER_HUB_USERNAME : ${{ secrets.DOCKER_HUB_USERNAME }}
24+ DOCKER_HUB_PASSWORD : ${{ secrets.DOCKER_HUB_PASSWORD }}
25+ REPOSITORY_NAME : nmrium-react-wrapper
26+ REPOSITORY_NAMESPACE : nfdi4chem
2527
2628jobs :
2729 e2etest :
5153 service_account_key : ${{ secrets.GKE_SA_KEY }}
5254 project_id : ${{ secrets.GKE_PROJECT }}
5355
54- # Configure docker to use the gcloud command-line tool as a credential helper
55- - name : Configure docker
56- run : |-
57- gcloud auth configure-docker europe-west3-docker.pkg.dev
58-
5956 # Get the GKE credentials so we can deploy to the cluster
6057 - name : Get GKE credentials
6158 uses : google-github-actions/get-gke-credentials@v0.3.0
@@ -64,15 +61,17 @@ jobs:
6461 location : ${{ env.GKE_ZONE }}
6562 credentials : ${{ secrets.GKE_SA_KEY }}
6663
67- # Build the Docker image
68- - name : Build docker image
69- run : |-
70- docker build -f Dockerfile.prod --tag europe-west3-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME_DEV/$IMAGE:latest .
71-
72- # Push the Docker image to Google Artifact Registry
73- - name : Publish image to Google Artifact Registry
74- run : |-
75- docker push "europe-west3-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME_DEV/$IMAGE:latest"
64+ - name : Build and push Docker image
65+ uses : docker/build-push-action@v4
66+ with :
67+ context : .
68+ file : ./Dockerfile.prod
69+ push : true
70+ build-args : |
71+ RELEASE_VERSION=dev-latest
72+ tags : ${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:dev-latest
73+ username : ${{ env.DOCKER_HUB_USERNAME }}
74+ password : ${{ env.DOCKER_HUB_PASSWORD }}
7675
7776 # Deploy the latest Docker image to the GKE cluster
7877 - name : Deploy
0 commit comments