-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (50 loc) · 1.57 KB
/
firebase.function.publish.yml
File metadata and controls
50 lines (50 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Action - Firebase functions publish
on:
workflow_call:
inputs:
node_version:
description: 'The Node version used (ex: 22.x)'
required: true
type: string
function_path:
description: 'Path of the Firebase functions'
required: true
type: string
function_urls:
description: 'Firebase functions monitoring'
required: true
type: string
jobs:
deploy:
environment:
name: firebase-function
url: ${{ inputs.function_urls }}
runs-on: ubuntu-latest
name: 'Deploy Firebase functions'
steps:
- name: 'Checkout source code'
uses: actions/checkout@v6.0.2
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.PASSPHRASE }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: 'Setup Node / NPM'
uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node_version }}
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: 'Install firebase-tools'
run: npm install -g firebase-tools
- name: 'Install npm packages'
run: |
cd ${{ inputs.function_path }}/functions
npm ci
- name: 'Publish'
run: |
cd ${{ inputs.function_path }}
firebase deploy --only functions
env:
GOOGLE_APPLICATION_CREDENTIALS: '${{ github.workspace }}/${{ vars.GOOGLE_APPLICATION_CREDENTIALS }}'