Skip to content

Moderation 2024-12-23 (#565) #1699

Moderation 2024-12-23 (#565)

Moderation 2024-12-23 (#565) #1699

Workflow file for this run

on: [push]
jobs:
build-api:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- id: get_branch
run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- id: set_image_name
run: echo "IMAGE_NAME=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/api/${BRANCH}" >> $GITHUB_ENV
- name: Build Docker Image
run: docker build -t $IMAGE_NAME:$GITHUB_SHA -f api.Dockerfile .
- name: Push Docker Image to Google Artifact Registry
run: |
gcloud auth configure-docker us-east1-docker.pkg.dev
docker push $IMAGE_NAME:$GITHUB_SHA
build-chat:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- id: get_branch
run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- id: set_image_name
run: echo "IMAGE_NAME=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/chat/${BRANCH}" >> $GITHUB_ENV
- name: Build Docker Image
run: docker build -t $IMAGE_NAME:$GITHUB_SHA -f chat.Dockerfile .
- name: Push Docker Image to Google Artifact Registry
run: |
gcloud auth configure-docker us-east1-docker.pkg.dev
docker push $IMAGE_NAME:$GITHUB_SHA
build-cron:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- id: get_branch
run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- id: set_image_name
run: echo "IMAGE_NAME=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/cron/${BRANCH}" >> $GITHUB_ENV
- name: Build Docker Image
run: docker build -t $IMAGE_NAME:$GITHUB_SHA -f cron.Dockerfile .
- name: Push Docker Image to Google Artifact Registry
run: |
gcloud auth configure-docker us-east1-docker.pkg.dev
docker push $IMAGE_NAME:$GITHUB_SHA