diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 08b2fa73..bf4d06fd 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -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 }} diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index c1ac66b4..32fc9281 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -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 }} diff --git a/.github/workflows/wc-firebase-hosting.yml b/.github/workflows/wc-firebase-hosting.yml index 820d6814..b8628fe5 100644 --- a/.github/workflows/wc-firebase-hosting.yml +++ b/.github/workflows/wc-firebase-hosting.yml @@ -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: @@ -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 \ No newline at end of file