Skip to content

Commit

Permalink
feat: Read variables
Browse files Browse the repository at this point in the history
  • Loading branch information
cybersokari committed May 5, 2024
1 parent 80d2f02 commit 4ed3cdd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ jobs:
- name: Build with Maven
run: mvn -B package -DskipTests

- name: Read variables
run: echo "IMAGE_PATH=${{env.IMAGE_PATH}}" && echo "DOCKER_CRED_HELPER=${{env.DOCKER_CRED_HELPER}}" && echo "VM_NAME=${{env.VM_NAME}}" && echo "ZONE=${{env.ZONE}}"

- name: Login to Artifact Registry
run: gcloud auth configure-docker ${{env.DOCKER_CRED_HELPER}} -q
run: gcloud auth configure-docker $DOCKER_CRED_HELPER -q

# - name: Push image to Artifact Registry
# - name: Push image to Artifact Registry
# run: gcloud container images upload us-central1-docker.pkg.dev/gatedaccessdev/cove-repo/vm:latest
- name: Update VM with new image
run: gcloud compute instances update-container ${{env.VM_NAME}} --zone=${{env.ZONE}} --container-image=${{env.DOCKER_CRED_HELPER}}/${{env.IMAGE_PATH}}
run: gcloud compute instances update-container $VM_NAME --zone=$ZONE --container-image=$DOCKER_CRED_HELPER/$IMAGE_PATH

0 comments on commit 4ed3cdd

Please sign in to comment.