Skip to content

Commit

Permalink
Merge pull request #14 from hypersign-protocol/CD
Browse files Browse the repository at this point in the history
updated action
  • Loading branch information
Pratap2018 authored Dec 4, 2023
2 parents ec9447c + 0841a8f commit 61c6dec
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/image-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,41 @@ on:
- "master"

jobs:
deploy:
build-push-artifact:
runs-on: ubuntu-latest
steps:
- name: code checkout
uses: actions/checkout@v2
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: build and push the docker image
env:
GOOGLE_PROJECT_ID: ${{secrets.GOOGLE_PROJECT_ID}}
- name: "Docker Auth"
run:
gcloud auth configure-docker asia-south1-docker.pkg.dev

docker build -t asia-south1-docker.pkg.dev/$GOOGLE_PROJECT_ID/hypersign-image-repository/hypersign-vault-service:latest .

docker push asia-south1-docker.pkg.dev/$GOOGLE_PROJECT_ID/hypersign-image-repository/hypersign-vault-service:latest
- 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/



Expand Down

0 comments on commit 61c6dec

Please sign in to comment.