Skip to content

Update image-publish.yaml #7

Update image-publish.yaml

Update image-publish.yaml #7

name: Vault Service Build and Publish to google artifact repository
on:
push:
branches:
- "master"
jobs:
build-push-artifact:
runs-on: ubuntu-latest
steps:
- name: code checkout
uses: actions/checkout@v3
- id: "auth"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}"
- name: install gcloud cli tools
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{secrets.GOOGLE_PROJECT_ID}}
service_account_key: ${{secrets.GOOGLE_APPLICATION_CREDENTIALS}}
export_default_credentials: true
- name: "Use gcloud CLI"
run: "gcloud info"
- name: "Docker Auth"
run:
gcloud auth configure-docker asia-south1-docker.pkg.dev
- name: "Docker Build"
env:
GOOGLE_PROJECT_ID: ${{secrets.GOOGLE_PROJECT_ID}}
run:
docker build -t asia-south1-docker.pkg.dev/$GOOGLE_PROJECT_ID/hypersign-image-repository/ .
- name: Push image
env:
GOOGLE_PROJECT_ID: ${{secrets.GOOGLE_PROJECT_ID}}
run:
docker push asia-south1-docker.pkg.dev/$GOOGLE_PROJECT_ID/hypersign-image-repository/