This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
Disable Auto Account Approval #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build | |
on: | |
push: | |
branches: | |
- main | |
- test | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Env setup | |
run: cat metadata >> "$GITHUB_ENV" | |
- name: Authenticate to Google Cloud | |
uses: google-github-actions/auth@v1.1.1 | |
with: | |
token_format: 'access_token' | |
workload_identity_provider: ${{ secrets.PROVIDER_NAME }} | |
service_account: ${{ secrets.SA_EMAIL }} | |
- name: Build and push the image | |
uses: RafikFarhad/push-to-gcr-github-action@v5-beta | |
with: | |
registry: gcr.io | |
project_id: ${{ env.GCP_PROJECT }} | |
image_name: ${{ env.IMAGE_NAME }} | |
image_tag: ${{ github.sha }} | |
dockerfile: ./api/Dockerfile | |
context: ./api | |
push_only: false |