Skip to content

Commit

Permalink
feat: add push to gcr action
Browse files Browse the repository at this point in the history
  • Loading branch information
esaminu committed Oct 4, 2023
1 parent e54891c commit 4ff83ef
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- main

permissions:
id-token: write
contents: read

concurrency:
group: 'fast-auth-signer-deployment'
cancel-in-progress: true
Expand All @@ -27,3 +31,7 @@ jobs:
with:
environment: mainnet
secrets: inherit

deploy-docker-image-to-gcr:
uses: ./.github/workflows/push-to-gcr.yml
secrets: inherit
26 changes: 26 additions & 0 deletions .github/workflows/push-to-gcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Push to GCR GitHub Action

on:
workflow_call:

permissions:
id-token: write
contents: read

jobs:
build-and-push-to-gcr:
runs-on: ubuntu-latest
environment: mainnet
steps:
- uses: actions/checkout@v3
- uses: google-github-actions/setup-gcloud@v1
- uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY_JSON }}
- run: gcloud auth activate-service-account ${{ secrets.SERVICE_ACCOUNT }} --key-file=$GOOGLE_GHA_CREDS_PATH
- uses: RafikFarhad/push-to-gcr-github-action@v5-beta
with:
registry: gcr.io
project_id: fast-auth-sdk
image_name: frontend
image_tag: latest

0 comments on commit 4ff83ef

Please sign in to comment.