From 6d5356aa9a458fd1573b446ec985dc2f353394e1 Mon Sep 17 00:00:00 2001 From: Emmanuel Date: Thu, 18 Jan 2024 20:20:56 +0100 Subject: [PATCH] feat: make target dynamic --- .github/workflows/main.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 77e73a8..38f47c0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,10 +12,12 @@ jobs: include: - org: Devfest Lille secret: DEVFEST_FIREBASE_TOKEN - function: 'functions:cms4devfestgdg' + function: "functions:cms4devfestgdg" + target: "default" - org: Cloud Nord secret: CLOUDNORD_FIREBASE_TOKEN - function: 'functions:cms4devfestcloudnord' + function: "functions:cms4devfestcloudnord" + target: "cloudnord" steps: - name: Checkout Repo uses: actions/checkout@master @@ -30,9 +32,9 @@ jobs: run: npm --prefix functions install - name: Deploy to Firebase for ${{ matrix.org }} run: | - npx firebase-tools deploy -P default --only hosting - npx firebase-tools deploy -P default --only firestore:rules - npx firebase-tools deploy -P default --only functions:cms - npx firebase-tools deploy -P default --only ${{ matrix.function }} + npx firebase-tools deploy -P ${{ matrix.target }} --only hosting + npx firebase-tools deploy -P ${{ matrix.target }} --only firestore:rules + npx firebase-tools deploy -P ${{ matrix.target }} --only functions:cms + npx firebase-tools deploy -P ${{ matrix.target }} --only ${{ matrix.function }} env: FIREBASE_TOKEN: ${{ secrets[matrix.secret] }}