FirebaseExtended / action-hosting-deploy

Automatically deploy shareable previews for your Firebase Hosting sites
https://firebase.google.com/docs/hosting/github-integration
Apache License 2.0
704 stars 202 forks source link

Allow specifying the firebase-tools version to use #224

Open samatcolumn opened 2 years ago

samatcolumn commented 2 years ago

The use case you're trying to solve

This action uses npx firebase-tools which always runs the latest version of firebase-tools (afaict). Instead I'd like to be able to pass the version so that this can deploy using the same version that my team uses locally.

Change to the action that would solve that use case

See above.

Other considerations

Nope!

samatcolumn commented 2 years ago

I think these recent issues make an even stronger case for being able to pin this version:

kariem commented 1 year ago

I am using the parameter documented in the readme: firebaseToolsVersion (ref). This seems to work as I would expect it.

When I set with.firebaseToolsVersion to 6.12.0, it's called with the corresponding version npx firebase-tools@${firebaseToolsVersion}.

From the actions log:

▼ Run FirebaseExtended/action-hosting-deploy@v0
  with:
    repoToken: ***
      firebaseServiceAccount: ***
      firebaseToolsVersion: 6.12.0               // ← correctly set here
      projectId: {project-id}
      ...
  ...
▶ Verifying firebase.json exists
▶ Setting up CLI credentials
▼ Deploying to production site      // ↓ used here
  /usr/local/bin/npx firebase-tools@6.12.0 deploy --only hosting --project {project-id} --json
    ...