Skip to content

Commit 9dc3c47

Browse files
Fix deploy translation error
1 parent 8454034 commit 9dc3c47

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

.github/workflows/deploy-functions.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,4 @@ jobs:
4444
uses: ./
4545
with:
4646
environment: ${{ github.event.inputs.environment }}
47-
service_account_json: ${{ github.event.inputs.environment == 'prod' && secrets.FIREBASE_PROD_SERVICE_ACCOUNT || secrets.FIREBASE_STAGING_SERVICE_ACCOUNT }}
4847
project_id: ${{ github.event.inputs.environment == 'prod' && 'hello-wisdom-prod' || 'hello-wisdom-staging' }}

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ jobs:
5656
- uses: ./ # Uses local action for testing
5757
with:
5858
environment: ${{ github.event_name == 'push' && github.ref_name || inputs.environment }}
59-
service_account_json: ${{ secrets[format('FIREBASE_{0}_SERVICE_ACCOUNT', github.event_name == 'push' && github.ref_name || inputs.environment)] }}
6059
project_id: ${{ vars[format('FIREBASE_{0}_PROJECT_ID', github.event_name == 'push' && github.ref_name || inputs.environment)] }}
6160
```
6261
@@ -67,18 +66,21 @@ When using in your own repository, reference a specific version:
6766
with:
6867
functions_dir: 'src/functions' # Default is 'functions'
6968
environment: staging
70-
service_account_json: ${{ secrets.FIREBASE_STAGING_SERVICE_ACCOUNT }}
7169
project_id: my-project-staging
7270
```
7371
72+
Note: The action requires the following secrets to be defined in your repository:
73+
74+
- `FIREBASE_STAGING_SERVICE_ACCOUNT`: Service account JSON for staging environment
75+
- `FIREBASE_PROD_SERVICE_ACCOUNT`: Service account JSON for production environment
76+
7477
## Inputs
7578

76-
| Input | Description | Required | Default |
77-
| ---------------------- | ------------------------------------------------- | -------- | ----------- |
78-
| `functions_dir` | Directory containing functions and pyproject.toml | No | `functions` |
79-
| `environment` | Environment to deploy to (staging/prod) | Yes | N/A |
80-
| `service_account_json` | Firebase service account JSON | Yes | N/A |
81-
| `project_id` | Firebase project ID | Yes | N/A |
79+
| Input | Description | Required | Default |
80+
| --------------- | ------------------------------------------------- | -------- | ----------- |
81+
| `functions_dir` | Directory containing functions and pyproject.toml | No | `functions` |
82+
| `environment` | Environment to deploy to (staging/prod) | Yes | N/A |
83+
| `project_id` | Firebase project ID | Yes | N/A |
8284

8385
## Prerequisites
8486

action.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ inputs:
2222
options:
2323
- staging
2424
- prod
25-
service_account_json:
26-
description: 'Firebase service account JSON'
27-
required: true
2825
project_id:
2926
description: 'Firebase project ID'
3027
required: true
@@ -56,8 +53,10 @@ runs:
5653
5754
- name: Authenticate with GCP service account key
5855
shell: bash
56+
env:
57+
SERVICE_ACCOUNT_JSON: ${{ inputs.environment == 'prod' && secrets.FIREBASE_PROD_SERVICE_ACCOUNT || secrets.FIREBASE_STAGING_SERVICE_ACCOUNT }}
5958
run: |
60-
echo "${{ inputs.service_account_json }}" > service-account.json
59+
echo "$SERVICE_ACCOUNT_JSON" > service-account.json
6160
echo "GOOGLE_APPLICATION_CREDENTIALS=service-account.json" >> $GITHUB_ENV
6261
6362
- name: Authenticate GitHub Actions service account

0 commit comments

Comments
 (0)