-
Notifications
You must be signed in to change notification settings - Fork 4
82 lines (73 loc) · 3.39 KB
/
invoke-fern-bot-update-spec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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_LOGIN_NAME: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_LOGIN_NAME }}
GITHUB_APP_LOGIN_ID: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_LOGIN_ID }}
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 }}
FERNIE_SLACK_APP_TOKEN: ${{ secrets.FERNIE_SLACK_APP_TOKEN }}
DEFAULT_VENUS_ORIGIN: "https://venus-dev2.buildwithfern.com"
DEFAULT_FDR_ORIGIN: "https://registry-dev2.buildwithfern.com"
CO_API_KEY: ${{ secrets.DEV_CO_API_KEY }}
REPO_TO_RUN_ON: ${{ github.event.inputs.repo }}
CI: false
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v4
- name: 📥 Install
uses: ./.github/actions/install
- name: Compile
run: pnpm compile
- name: 🚀 serverless deploy
run: |
pnpm --filter "@fern-platform/fern-bot" install
pnpm --filter "@fern-platform/fern-bot" invoke local --function updateOpenApiSpecs --stage development
invoke_prod:
if: ${{ github.event.inputs.environment == 'production' }}
runs-on: ubuntu-latest
env:
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
GITHUB_APP_LOGIN_NAME: ${{ secrets.FERN_BOT_PROD_GITHUB_APP_LOGIN_NAME }}
GITHUB_APP_LOGIN_ID: ${{ secrets.FERN_BOT_PROD_GITHUB_APP_LOGIN_ID }}
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 }}
DEFAULT_VENUS_ORIGIN: "https://venus.buildwithfern.com"
DEFAULT_FDR_ORIGIN: "https://registry.buildwithfern.com"
CO_API_KEY: ${{ secrets.PROD_CO_API_KEY }}
REPO_TO_RUN_ON: ${{ github.event.inputs.repo }}
CI: false
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v4
- name: 📥 Install
uses: ./.github/actions/install
- name: Compile
run: pnpm compile
- name: 🚀 serverless deploy
run: |
pnpm --filter "@fern-platform/fern-bot" install
pnpm --filter "@fern-platform/fern-bot" invoke local --function updateOpenApiSpecs --stage production