From 9a2c30ffa80fd979a1904aa229ad7ac86193564d Mon Sep 17 00:00:00 2001 From: Jacob Wenger Date: Tue, 24 Dec 2024 13:31:53 -0800 Subject: [PATCH] Downgraded Firebase Functions from Node 22 to 20 (#113) * Downgraded Firebase Functions from Node 22 to 20 * Added Superfeedr API env variables --- .github/workflows/firebase-functions-merge.yml | 12 ++++++++++++ .../workflows/firebase-functions-pull-request.yml | 12 ++++++++++++ firebase.json | 1 + 3 files changed, 25 insertions(+) diff --git a/.github/workflows/firebase-functions-merge.yml b/.github/workflows/firebase-functions-merge.yml index 0725ed9..b6c8f9b 100644 --- a/.github/workflows/firebase-functions-merge.yml +++ b/.github/workflows/firebase-functions-merge.yml @@ -35,12 +35,24 @@ jobs: working-directory: packages/functions env: FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }} + SUPERFEEDR_USER: ${{ secrets.SUPERFEEDR_USER }} + SUPERFEEDR_API_KEY: ${{ secrets.SUPERFEEDR_API_KEY }} run: | if [ -z "$FIRECRAWL_API_KEY" ]; then echo "Error: FIRECRAWL_API_KEY secret must be added in GitHub" exit 1 fi + if [ -z "$SUPERFEEDR_USER" ]; then + echo "Error: SUPERFEEDR_USER secret must be added in GitHub" + exit 1 + fi + if [ -z "$SUPERFEEDR_API_KEY" ]; then + echo "Error: SUPERFEEDR_API_KEY secret must be added in GitHub" + exit 1 + fi echo "FIRECRAWL_API_KEY=${FIRECRAWL_API_KEY}" > .env.conductor-prod + echo "SUPERFEEDR_USER=${SUPERFEEDR_USER}" >> .env.conductor-prod + echo "SUPERFEEDR_API_KEY=${SUPERFEEDR_API_KEY}" >> .env.conductor-prod - name: Deploy Firebase Functions env: FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} diff --git a/.github/workflows/firebase-functions-pull-request.yml b/.github/workflows/firebase-functions-pull-request.yml index 3717289..6943a4f 100644 --- a/.github/workflows/firebase-functions-pull-request.yml +++ b/.github/workflows/firebase-functions-pull-request.yml @@ -37,12 +37,24 @@ jobs: working-directory: packages/functions env: FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }} + SUPERFEEDR_USER: ${{ secrets.SUPERFEEDR_USER }} + SUPERFEEDR_API_KEY: ${{ secrets.SUPERFEEDR_API_KEY }} run: | if [ -z "$FIRECRAWL_API_KEY" ]; then echo "Error: FIRECRAWL_API_KEY secret must be added in GitHub" exit 1 fi + if [ -z "$SUPERFEEDR_USER" ]; then + echo "Error: SUPERFEEDR_USER secret must be added in GitHub" + exit 1 + fi + if [ -z "$SUPERFEEDR_API_KEY" ]; then + echo "Error: SUPERFEEDR_API_KEY secret must be added in GitHub" + exit 1 + fi echo "FIRECRAWL_API_KEY=${FIRECRAWL_API_KEY}" > .env.conductor-stag + echo "SUPERFEEDR_USER=${SUPERFEEDR_USER}" >> .env.conductor-stag + echo "SUPERFEEDR_API_KEY=${SUPERFEEDR_API_KEY}" >> .env.conductor-stag - name: Deploy Firebase Functions env: FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} diff --git a/firebase.json b/firebase.json index ce7c071..bd086a8 100644 --- a/firebase.json +++ b/firebase.json @@ -33,6 +33,7 @@ "functions": [ { "source": "packages/functions", + "runtime": "nodejs20", "ignore": ["node_modules", ".git", "firebase-debug.log", "firebase-debug.*.log", "*.local"] } ]