make new CI action for combined action. #146
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: ci | |
on: [push] | |
env: | |
PROJECT_ID: bhouston-general-hosting | |
SERVICE_NAME: template-typescript-monorepo | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: install workspace | |
uses: ./.github/actions/install-workspace | |
- name: npm run build | |
run: npm run build | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: install workspace | |
uses: ./.github/actions/install-workspace | |
- name: npm test | |
run: npm test | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: install workspace | |
uses: ./.github/actions/install-workspace | |
- name: npm run lint:check | |
run: npm run lint:check | |
dockerize-and-deploy: | |
name: dockerize-and-deploy | |
runs-on: ubuntu-latest | |
needs: [test, lint, build] | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: prepare docker and deploy | |
uses: ./.github/actions/dockerize-and-deploy | |
with: | |
credentials_json: ${{ secrets.GCP_SA_KEY }} | |
project_id: ${{ env.PROJECT_ID }} | |
service_name: ${{ env.SERVICE_NAME }} |