w9jds / setup-firebase

Firebase GitHub Action (replacement for firebase-action)
MIT License
24 stars 7 forks source link

🐛 Setting project_path causes "Setup Project" to fail #1

Open abegehr opened 1 year ago

abegehr commented 1 year ago

This is my GH action yml file:

name: Deploy to Firebase on merge
on:
  push:
    branches:
      - main
jobs:
  deploy:
    name: Deploy Firebase
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 18
      - uses: w9jds/setup-firebase@v1.0.0
        with:
          tools-version: 12.3.1
          gcp_sa_key: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_WINSIDER_C894D }}"
          project_path: firebase
      - run: firebase deploy --except hosting
        working-directory: firebase

When I run it by pushing to main, the Setup Project sets fails with an error:

Error: Failed to setup firebase with error Error: Unable to locate executable file: cd. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

When I remove project_path and run only with working-directory: firebase on the firebase deploy step, it works as expected. I have also tried with project_path and without working-directory, which also fails on "Setup Project". Is the project_path even necessary for setup-firebase, since it should just setup firebase-tools but the deploying in handled afterwards?

z4y4ts commented 1 month ago

I've faced the same issue and mashed up a fix for it - #6

I tested it on my private repo, and it works as intended without the error above.

Would you merge it? Need any help with it?