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 471b378
Show file tree
Hide file tree
Showing 2 changed files with 36 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
28 changes: 28 additions & 0 deletions .github/workflows/push-to-gcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v3
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY_JSON }}
- 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 471b378

Please sign in to comment.