Skip to content

github action to trigger kapstan #174

github action to trigger kapstan

github action to trigger kapstan #174

Workflow file for this run

name: Build and Push to Development
on:
push:
branches:
- master
env:
PROJECT_ID: dev-buildly
REGION: us
IMAGE_NAME: us-docker.pkg.dev/dev-buildly/gcr.io/labs-dev-buildly-ui
jobs:
build:
name: Build and Push to GCR
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- id: "auth"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCR_JSON_KEY }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"
- name: "Use gcloud CLI"
run: "gcloud info"
- name: yarn install, build and test
run: |
rm -rf node_modules
yarn install --force --no-lockfile --ignore-optional
yarn run build:dev
- name: "Docker auth"
run: |-
gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet
- name: Build docker image
run: docker build -t $IMAGE_NAME:latest .
- name: Push to Google Artifact Registry
run: docker push $IMAGE_NAME:latest
- name: Deploy on Kapstan
id: Kapstan
uses: kapstan-io/deployment-action@latest
with:
application_name: buildly-core
image_repository_name: ${{ env.IMAGE_NAME }}
image_tag: latest
kapstan_api_key: ${{ secrets.KAPSTAN_KEY }}
wait_for_deployment: false