Merge pull request #319 from pennlabs/benjmnxu-patch-1 #379
Workflow file for this run
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
# ======================================== | |
# Note: If you make changes to this CI/CD, please include someone from DevOps in the list of reviewers for the PR. | |
# ======================================== | |
name: Build and Deploy OHQ | |
on: push | |
jobs: | |
# backend-check: | |
# name: "Backend Check" | |
# uses: pennlabs/shared-actions/.github/workflows/[email protected] | |
# with: | |
# projectName: officehoursqueue | |
# path: backend | |
# flake: true | |
# black: true | |
publish-backend: | |
uses: pennlabs/shared-actions/.github/workflows/[email protected] | |
with: | |
# Inputs | |
imageName: "office-hours-queue-backend" | |
githubRef: ${{ github.ref }} | |
gitSha: ${{ github.sha }} | |
# Optional inputs | |
# Path to the docker context | |
path: backend | |
# Path to the dockerfile (relative to `path` variable) | |
dockerfile: Dockerfile | |
# If enabled, will cache_from the latest version of the docker image. | |
cache: true | |
secrets: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
# needs: backend-check | |
frontend-check: | |
name: "Frontend Check" | |
uses: pennlabs/shared-actions/.github/workflows/[email protected] | |
with: | |
path: frontend | |
nodeVersion: 18.0.0 | |
publish-frontend: | |
uses: pennlabs/shared-actions/.github/workflows/[email protected] | |
with: | |
# Inputs | |
imageName: "office-hours-queue-frontend" | |
githubRef: ${{ github.ref }} | |
gitSha: ${{ github.sha }} | |
# Path to the docker context | |
path: frontend | |
# Path to the dockerfile (relative to `path` variable) | |
dockerfile: Dockerfile | |
# If enabled, will cache_from the latest version of the docker image. | |
cache: true | |
secrets: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
needs: frontend-check | |
deploy: | |
name: "Deploy" | |
uses: pennlabs/shared-actions/.github/workflows/[email protected] | |
with: | |
githubRef: ${{ github.ref }} | |
gitSha: ${{ github.sha }} | |
secrets: | |
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} | |
GH_AWS_ACCESS_KEY_ID: ${{ secrets.GH_AWS_ACCESS_KEY_ID }} | |
GH_AWS_SECRET_ACCESS_KEY: ${{ secrets.GH_AWS_SECRET_ACCESS_KEY }} | |
needs: | |
- publish-backend | |
- publish-frontend |