Skip to content

Commit

Permalink
Merge pull request #44 from ajhenry/ajhenry/emu
Browse files Browse the repository at this point in the history
Update workflows to output example env to allow builds to compile
  • Loading branch information
ajhenry authored Feb 22, 2024
2 parents f197c63 + 6c3c0dc commit cfa86c6
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# GitHub App Details
APP_ID=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
APP_ID=12345
GITHUB_CLIENT_ID=Iv1.12345def
GITHUB_CLIENT_SECRET=clientsecret

# Private key for the GitHub App
PRIVATE_KEY=-----BEGIN RSA PRIVATE KEY-----\nYOUR KEY HERE WITH \n INCLUDED=\n-----END RSA PRIVATE KEY-----\n
Expand All @@ -12,7 +12,7 @@ NEXTAUTH_URL=http://localhost:3000

# Go to https://smee.io/new set this to the URL that you are redirected to.
WEBHOOK_PROXY_URL=
WEBHOOK_SECRET=
WEBHOOK_SECRET=bad-secret

# Use `trace` to get verbose logging or `info` to show less
LOG_LEVEL=debug
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Run Build
on:
- push
- workflow_dispatch
- pull_request

jobs:
build:
Expand All @@ -15,5 +16,8 @@ jobs:
- name: Install Dependencies
run: npm install

- name: Setup CI Environment
run: mv .env.example .env

- name: Run Build
run: NEXT_TELEMETRY_DISABLED=1 npm run build
4 changes: 4 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build Docker Image
on:
- push
- workflow_dispatch
- pull_request

jobs:
build:
Expand All @@ -12,5 +13,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup CI Environment
run: mv .env.example .env

- name: Build Docker image
run: docker build -t internal-contribution-forks .
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Run Lint
on:
- push
- workflow_dispatch
- pull_request

jobs:
build:
Expand All @@ -15,5 +16,8 @@ jobs:
- name: Install Dependencies
run: npm install

- name: Setup CI Environment
run: mv .env.example .env

- name: Run Lint
run: npm run lint
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Run Jest Tests
on:
- push
- workflow_dispatch
- pull_request

jobs:
build:
Expand All @@ -15,5 +16,8 @@ jobs:
- name: Install Dependencies
run: npm install

- name: Setup CI Environment
run: mv .env.example .env

- name: Run Jest Tests
run: npm test
2 changes: 1 addition & 1 deletion src/env.mjs → env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const env = createEnv({
PRIVATE_KEY: z.string(),

// Optional environment variables
WEBHOOK_PROXY_URL: z.string().url().optional(),
WEBHOOK_PROXY_URL: z.string().url().optional().or(z.literal('')),
LOG_LEVEL: z.string().optional().default('debug'),
NODE_ENV: z.string().optional().default('development'),
PUBLIC_ORG: z.string().optional(),
Expand Down
2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './src/env.mjs'
import './env.mjs'

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand Down

0 comments on commit cfa86c6

Please sign in to comment.