Skip to content

Commit

Permalink
create frontend workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed May 24, 2024
1 parent 947021b commit c37e4f7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/actions/gcloud/deploy-app/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Code for Life - GCloud - Deploy App"
description: "Deploy an app to Google Cloud."
inputs:
gcp-credentials:
description: "The JSON credentials uses to access GCP."
description: "The JSON credentials used to access GCP."
required: true
deploy-args:
description: "Arguments to pass to `gcloud app deploy`."
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/frontend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Frontend

on:
workflow_call:
secrets:
CODECOV_TOKEN:
description: "The token used to gain access to Codecov."
required: true
GCP_CREDENTIALS:
description: "The JSON credentials used to access GCP."
required: true

jobs:
test:
uses: ocadotechnology/codeforlife-workspace/.github/workflows/test-javascript-code.yaml@configure_js_services # TODO: set to @main
secrets: inherit

deploy:
runs-on: ubuntu-latest
needs: [test]
# if: github.ref_name == 'production' || github.ref_name == 'development' || github.ref_name == 'staging'
environment: ${{ github.ref_name }}
steps:
- name: 🛫 Checkout
uses: actions/checkout@v4

- name: 🚀 Deploy App on GCloud
uses: ocadotechnology/codeforlife-workspace/.github/actions/gcloud/deploy-app@configure_js_services # TODO: set to @main
with:
gcp-credentials: ${{ secrets.GCP_CREDENTIALS }}
2 changes: 1 addition & 1 deletion .github/workflows/test-javascript-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:
secrets:
CODECOV_TOKEN:
description: "The token used to gain access to Codecov."
required: false
required: true

jobs:
test-js-code:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-python-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ on:
secrets:
CODECOV_TOKEN:
description: "The token used to gain access to Codecov."
required: false
required: true

jobs:
test-py-code:
Expand Down

0 comments on commit c37e4f7

Please sign in to comment.