Skip to content

Commit

Permalink
feat(homebrew sharing): Begin working on adding functions for sharing…
Browse files Browse the repository at this point in the history
… homebrew
  • Loading branch information
scottbenton committed Apr 25, 2024
1 parent 2811386 commit fa6a020
Show file tree
Hide file tree
Showing 15 changed files with 8,723 additions and 18 deletions.
5 changes: 3 additions & 2 deletions .firebaserc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"projects": {
"iron-fellowship-prod": "iron-journal-1ac32",
"iron-fellowship-dev": "iron-fellowship-dev",
"crew-link-prod":"starforged-crew-link",
"crew-link-dev":"crew-link-dev"
"crew-link-prod": "starforged-crew-link",
"crew-link-dev": "crew-link-dev",
"default": "iron-fellowship-dev"
},
"targets": {},
"etags": {}
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/firebase-hosting-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ jobs:
env:
GCP_SA_KEY: ${{ secrets.IRON_FELLOWSHIP_FIREBASE_SERVICE_ACCOUNT }}
PROJECT_ID: "${{secrets.IRON_FELLOWSHIP_FIREBASE_PROJECTID}}"
deploy_functions_iron_fellowship:
name: Deploy Firebase Functions to Iron Fellowship
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v2
- run: cd functions && npm ci && npm run build
- uses: w9jds/[email protected]
with:
args: deploy --only functions
env:
GCP_SA_KEY: ${{ secrets.IRON_FELLOWSHIP_FIREBASE_SERVICE_ACCOUNT }}
PROJECT_ID: "${{secrets.IRON_FELLOWSHIP_FIREBASE_PROJECTID}}"

build_and_deploy_crew_link:
name: Build and Deploy Crew Link to Firebase Hosting
runs-on: ubuntu-latest
Expand Down Expand Up @@ -105,3 +119,16 @@ jobs:
env:
GCP_SA_KEY: ${{ secrets.CREW_LINK_FIREBASE_SERVICE_ACCOUNT }}
PROJECT_ID: "${{secrets.CREW_LINK_FIREBASE_PROJECTID}}"
deploy_functions_crew_link:
name: Deploy Firebase Functions to Crew Link
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v2
- run: cd functions && npm ci && npm run build
- uses: w9jds/[email protected]
with:
args: deploy --only functions
env:
GCP_SA_KEY: ${{ secrets.CREW_LINK_FIREBASE_SERVICE_ACCOUNT }}
PROJECT_ID: "${{secrets.CREW_LINK_FIREBASE_PROJECTID}}"
13 changes: 13 additions & 0 deletions .github/workflows/firebase-hosting-pull-request-crew-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,16 @@ jobs:
env:
GCP_SA_KEY: ${{ secrets.CREW_LINK_FIREBASE_SERVICE_ACCOUNT }}
PROJECT_ID: "${{secrets.CREW_LINK_FIREBASE_PROJECTID}}"
deploy_functions_crew_link:
name: Deploy Firebase Functions to Crew Link
runs-on: ubuntu-latest
environment: Dev
steps:
- uses: actions/checkout@v2
- run: cd functions && npm ci && npm run build
- uses: w9jds/[email protected]
with:
args: deploy --only functions
env:
GCP_SA_KEY: ${{ secrets.CREW_LINK_FIREBASE_SERVICE_ACCOUNT }}
PROJECT_ID: "${{secrets.CREW_LINK_FIREBASE_PROJECTID}}"
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,16 @@ jobs:
env:
GCP_SA_KEY: ${{ secrets.IRON_FELLOWSHIP_FIREBASE_SERVICE_ACCOUNT }}
PROJECT_ID: "${{secrets.IRON_FELLOWSHIP_FIREBASE_PROJECTID}}"
deploy_functions_iron_fellowship:
name: Deploy Firebase Functions to Iron Fellowship
runs-on: ubuntu-latest
environment: Dev
steps:
- uses: actions/checkout@v2
- run: cd functions && npm ci && npm run build
- uses: w9jds/[email protected]
with:
args: deploy --only functions
env:
GCP_SA_KEY: ${{ secrets.IRON_FELLOWSHIP_FIREBASE_SERVICE_ACCOUNT }}
PROJECT_ID: "${{secrets.IRON_FELLOWSHIP_FIREBASE_PROJECTID}}"
18 changes: 17 additions & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,21 @@
},
"storage": {
"rules": "storage.rules"
}
},
"functions": [
{
"source": "functions",
"codebase": "default",
"ignore": [
"node_modules",
".git",
"firebase-debug.log",
"firebase-debug.*.log"
],
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
]
}
]
}
28 changes: 28 additions & 0 deletions functions/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
root: true,
env: {
es6: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["tsconfig.json", "tsconfig.dev.json"],
sourceType: "module",
},
ignorePatterns: [
"/lib/**/*", // Ignore built files.
],
plugins: ["@typescript-eslint", "import"],
rules: {
quotes: ["error", "double"],
"import/no-unresolved": 0,
indent: ["error", 2],
},
};
9 changes: 9 additions & 0 deletions functions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Compiled JavaScript files
lib/**/*.js
lib/**/*.js.map

# TypeScript v1 declaration files
typings/

# Node.js dependency directory
node_modules/
Loading

0 comments on commit fa6a020

Please sign in to comment.