I have seen similar questions to this but I have a specific use case here which maybe be of interest, I am receiving an error which obviously means firebase-functions
is not being installed properly on docker container, everything work fine on local.
Entire deployment works perfect and file structure created in docker container looks right, with node_modules
being placed in correct folder, everything.
Does docker need to be enabled to expose port to firebase deploy to get correct download? Anyone have experience with this?
Error
[2022-10-08T08:09:34.513Z] Building nodejs source
i functions: Loaded environment variables from .env.development.
[2022-10-08T08:09:34.518Z] Could not find functions.yaml. Must use http discovery
[2022-10-08T08:09:34.533Z] Error: spawn ./node_modules/.bin/firebase-functions ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
action.yml
deploy-cloud:
name: Deploy Cloud
needs: e2e-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Checkout Repo
uses: actions/checkout@master
- name: Make envfile
uses: docker://xxxxxx/create-envfile:master
with:
...env vars...
directory: functions
file_name: .env.development
fail_on_empty: false
- name: Install Dependencies
working-directory: functions
run: yarn
- name: Build
working-directory: functions
run: yarn build
- name: Deploy to Firebase
uses: docker://xxxxxx/firebase-action:master
with:
args: deploy --project development --only functions --debug
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
Dockerfile for deploy action
FROM node:16.16.0-buster
LABEL version="0.0.1"
LABEL repository="https://github.com/xxxxxx/firebase-action"
LABEL homepage="https://github.com/xxxxxx/firebase-action"
LABEL maintainer="xxxxxx"
LABEL com.github.actions.name="GitHub Action for Firebase"
LABEL com.github.actions.description="Wraps the firebase-tools CLI to enable common commands."
LABEL com.github.actions.icon="package"
LABEL com.github.actions.color="gray-dark"
RUN apt update && apt-get install -y jq openjdk-11-jre
RUN npm i -g [email protected]
RUN npm i -g [email protected]
COPY LICENSE README.md /
COPY "entrypoint.sh" "/entrypoint.sh"
ENTRYPOINT ["/entrypoint.sh"]
CMD ["--help"]
I can confirm downgrading to firebase-tools
10.0.0 fixes this issue