-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce lambda-based fern-bot actions (#785)
- Loading branch information
1 parent
86154e8
commit 22d7850
Showing
35 changed files
with
57,682 additions
and
23,296 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Deploy FernBot Dev | ||
|
||
on: | ||
push: | ||
branches: main | ||
paths: | ||
- "servers/fern-bot/**" | ||
|
||
env: | ||
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }} | ||
GITHUB_APP_ID: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_ID }} | ||
GITHUB_APP_PRIVATE_KEY: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_PRIVATE_KEY }} | ||
GITHUB_APP_CLIENT_ID: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_CLIENT_ID }} | ||
GITHUB_APP_CLIENT_SECRET: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_CLIENT_SECRET }} | ||
GITHUB_APP_WEBHOOK_SECRET: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_WEBHOOK_SECRET }} | ||
CO_API_KEY: ${{ secrets.DEV_CO_API_KEY }} | ||
|
||
jobs: | ||
deploy_dev: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🚀 serverless deploy | ||
run: | | ||
pnpm --filter "@fern-platform/fern-bot" install | ||
pnpm --filter "@fern-platform/fern-bot" deploy --stage development |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Deploy FernBot Prod | ||
|
||
on: | ||
push: | ||
tags: ["*"] | ||
|
||
env: | ||
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }} | ||
GITHUB_APP_ID: ${{ secrets.FERN_BOT_PROD_GITHUB_APP_ID }} | ||
GITHUB_APP_PRIVATE_KEY: ${{ secrets.FERN_BOT_PROD_GITHUB_APP_PRIVATE_KEY }} | ||
GITHUB_APP_CLIENT_ID: ${{ secrets.FERN_BOT_PROD_GITHUB_APP_CLIENT_ID }} | ||
GITHUB_APP_CLIENT_SECRET: ${{ secrets.FERN_BOT_PROD_GITHUB_APP_CLIENT_SECRET }} | ||
GITHUB_APP_WEBHOOK_SECRET: ${{ secrets.FERN_BOT_PROD_GITHUB_APP_WEBHOOK_SECRET }} | ||
CO_API_KEY: ${{ secrets.PROD_CO_API_KEY }} | ||
|
||
jobs: | ||
deploy_prod: | ||
if: github.ref_type == 'tag' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/fern-bot@') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🚀 serverless deploy | ||
run: | | ||
pnpm --filter "@fern-platform/fern-bot" install | ||
pnpm --filter "@fern-platform/fern-bot" deploy --stage production |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Invoke FernBot - updateOpenApiSpec | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
type: choice | ||
description: Which environment to run the workflow in | ||
options: | ||
- production | ||
- development | ||
repo: | ||
description: 'The repo to run the action against (of the form `owner/repo_name`), if omitted runs on all repos the app is installed on' | ||
type: string | ||
|
||
|
||
jobs: | ||
invoke_dev: | ||
if: ${{ github.event.inputs.environment == 'development' }} | ||
runs-on: ubuntu-latest | ||
env: | ||
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }} | ||
GITHUB_APP_ID: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_ID }} | ||
GITHUB_APP_PRIVATE_KEY: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_PRIVATE_KEY }} | ||
GITHUB_APP_CLIENT_ID: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_CLIENT_ID }} | ||
GITHUB_APP_CLIENT_SECRET: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_CLIENT_SECRET }} | ||
GITHUB_APP_WEBHOOK_SECRET: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_WEBHOOK_SECRET }} | ||
CO_API_KEY: ${{ secrets.DEV_CO_API_KEY }} | ||
REPO_TO_RUN_ON: ${{ github.event.inputs.repo }} | ||
steps: | ||
- name: 🚀 serverless deploy | ||
run: | | ||
pnpm --filter "@fern-platform/fern-bot" install | ||
pnpm --filter "@fern-platform/fern-bot" invoke local --function updateOpenApiSpec --stage development | ||
invoke_prod: | ||
if: ${{ github.event.inputs.environment == 'production' }} | ||
runs-on: ubuntu-latest | ||
env: | ||
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }} | ||
GITHUB_APP_ID: ${{ secrets.FERN_BOT_PROD_GITHUB_APP_ID }} | ||
GITHUB_APP_PRIVATE_KEY: ${{ secrets.FERN_BOT_PROD_GITHUB_APP_PRIVATE_KEY }} | ||
GITHUB_APP_CLIENT_ID: ${{ secrets.FERN_BOT_PROD_GITHUB_APP_CLIENT_ID }} | ||
GITHUB_APP_CLIENT_SECRET: ${{ secrets.FERN_BOT_PROD_GITHUB_APP_CLIENT_SECRET }} | ||
GITHUB_APP_WEBHOOK_SECRET: ${{ secrets.FERN_BOT_PROD_GITHUB_APP_WEBHOOK_SECRET }} | ||
CO_API_KEY: ${{ secrets.PROD_CO_API_KEY }} | ||
REPO_TO_RUN_ON: ${{ github.event.inputs.repo }} | ||
steps: | ||
- name: 🚀 serverless deploy | ||
run: | | ||
pnpm --filter "@fern-platform/fern-bot" install | ||
pnpm --filter "@fern-platform/fern-bot" invoke local --function updateOpenApiSpec --stage production |
Oops, something went wrong.