Skip to content

feat: Make registry domain config command quiet #51

feat: Make registry domain config command quiet

feat: Make registry domain config command quiet #51

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Deploy to Artifact Registry, Update and restart VM
on:
push:
tags: [ "v*.*.*" ]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Authenticate GCP
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCLOUD_SERVICE_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
version: '>= 363.0.0'
- name: Docker Hub auth for Maven Jib to pull base image
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build with Maven
run: mvn -B package -DskipTests
- name: Login to Artifact Registry
run: gcloud auth configure-docker ${{env.DOCKER_CRED_HELPER}} -q
# - 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}}