Skip to content

Commit

Permalink
ci: environment
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsutakein committed Jan 27, 2024
1 parent 6cdaeca commit aed4616
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ concurrency:
group: preview-${{ github.ref }}
cancel-in-progress: true

env:
BOT_PRIVATE_KEY: ${{ secrets.BOT_PRIVATE_KEY }}

jobs:
build-and-deploy:
uses: ./.github/workflows/wc-firebase-hosting.yml
environment: 'development' # TODO: change to staging
with:
environment: 'development' # TODO: change to staging
channel-id: 'live'
gh-app-id: ${{ vars.BOT_APP_ID }}
gh-app-private-key: ${{ env.BOT_PRIVATE_KEY }}
gh-app-private-key: ${{ secrets.BOT_PRIVATE_KEY }}
project-id: ${{ vars.FIREBASE_PROJECT_ID }}
firebase-service-account: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
9 changes: 4 additions & 5 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ concurrency:
group: preview-${{ github.ref }}
cancel-in-progress: true

env:
BOT_PRIVATE_KEY: ${{ secrets.BOT_PRIVATE_KEY }}

jobs:
build-and-preview:
uses: ./.github/workflows/wc-firebase-hosting.yml
environment: 'development'
with:
environment: 'development'
gh-app-id: ${{ vars.BOT_APP_ID }}
gh-app-private-key: ${{ env.BOT_PRIVATE_KEY }}
gh-app-private-key: ${{ secrets.BOT_PRIVATE_KEY }}
project-id: ${{ vars.FIREBASE_PROJECT_ID }}
firebase-service-account: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
12 changes: 7 additions & 5 deletions .github/workflows/wc-firebase-hosting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ name: "Deploy to Firebase Hosting"
on:
workflow_call:
inputs:
environment:
required: true
type: string
gh-app-id:
required: true
type: string
channel-id:
required: false
type: string
project-id:
required: true
type: string
secrets:
gh-app-private-key:
required: true
firebase-service-account:
required: true

jobs:
build-and-deploy:
Expand Down Expand Up @@ -45,8 +47,8 @@ jobs:
- uses: FirebaseExtended/action-hosting-deploy@120e124148ab7016bec2374e5050f15051255ba2 # v0.7.1
with:
repoToken: '${{ steps.app-token.outputs.token }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
firebaseServiceAccount: '${{ secrets.firebase-service-account }}'
channelId: '${{ inputs.channel-id }}'
projectId: '${{ vars.PROJECT_ID }}'
projectId: '${{ inputs.project-id }}'
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks

0 comments on commit aed4616

Please sign in to comment.