Skip to content

feat: update prompt config page (PR 1) (#286) #41

feat: update prompt config page (PR 1) (#286)

feat: update prompt config page (PR 1) (#286) #41

name: 'Build (API-Gateway)'
on:
push:
branches:
- development
- production
paths:
- '.github/workflows/build-api-gateway.yaml'
- 'gen/go/gateway/**'
- 'gen/go/ptesting/**'
- 'go.*'
- 'services/api-gateway/**'
- 'shared/go/**'
env:
SERVICE_NAME: api-gateway
FILE_PATH: ./docker/Dockerfile.go-services
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
environment: ${{ github.ref_name }}
permissions:
contents: read
id-token: write
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
token_format: access_token
workload_identity_provider: projects/${{vars.GCP_PROJECT_NUMBER}}/locations/global/workloadIdentityPools/${{vars.GCP_WORKLOAD_IDENTITY_POOL}}/providers/${{vars.GCP_OIDC_PROVIDER_NAME}}
service_account: ${{vars.GCP_SERVICE_ACCOUNT_NAME}}@${{vars.GCP_PROJECT_ID}}.iam.gserviceaccount.com
- name: Login to Artifact Registry
uses: docker/login-action@v3
with:
registry: ${{vars.GCP_REGION}}-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
- name: Build and Push
uses: docker/build-push-action@v5
with:
push: true
context: .
file: ${{env.FILE_PATH}}
build-args: |
BUILD_TARGET=${{env.SERVICE_NAME}}
SERVICE_NAME=${{env.SERVICE_NAME}}
tags: |
${{vars.GCP_REGION}}-docker.pkg.dev/${{vars.GCP_PROJECT_ID}}/basemind/${{env.SERVICE_NAME}}:latest
${{vars.GCP_REGION}}-docker.pkg.dev/${{vars.GCP_PROJECT_ID}}/basemind/${{env.SERVICE_NAME}}:${{github.sha}}