Skip to content

Merge pull request #1 from FormFree/merge-upstream #4

Merge pull request #1 from FormFree/merge-upstream

Merge pull request #1 from FormFree/merge-upstream #4

Workflow file for this run

name: Build Docker Image
on:
push:
branches: ["main"]
env:
PROJECT_ID: formfree-400917
REGION: us-central1
GAR_LOCATION: us-central1-docker.pkg.dev/formfree-400917/images/dwn-server
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- id: "auth"
name: "Authenticate with Google Cloud"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}"
token_format: "access_token"
- uses: "docker/login-action@v1"
name: "Docker login"
with:
registry: "us-central1-docker.pkg.dev"
username: "oauth2accesstoken"
password: "${{ steps.auth.outputs.access_token }}"
- name: Build image
run: docker build . --tag ${{ env.GAR_LOCATION }}:${{github.sha}}
- name: Push image
run: docker push ${{ env.GAR_LOCATION }}:${{github.sha}}