1

I have the following github action using node 20

name: develop-pr

on:
  pull_request:
    branches:
      - develop

env:
  CI: true
  FIREBASE_EMULATORS_PATH: $GITHUB_WORKSPACE/emulator-cache

jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    strategy:
      matrix:
        node-version: [20.x]

    steps:
      - uses: actions/checkout@v4

      - name: Extract branch name
        shell: bash
        run: echo "##[name=branch >> $GITHUB_OUTPUT;]$(echo ${GITHUB_REF#refs/heads/})"
        id: extract_branch

      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}

      - name: "Cache npm"
        uses: actions/cache@v3
        env:
          cache-name: cache-node-modules
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}

      - name: "Cache Emulators"
        uses: actions/cache@v3
        with:
          path: ${{ env.FIREBASE_EMULATORS_PATH }}
          key: ${{ runner.os }}-firebase-emulators-${{ hashFiles('emulator-cache/*.{jar,zip}') }}
        continue-on-error: true

      - name: Setup Firebase CLI
        run: sudo npm install -g [email protected]

      - name: Install
        working-directory: ./functions
        run: npm install

      - name: Lint
        working-directory: ./functions
        run: npm run lint

      - name: Test
        working-directory: ./functions
        run: npm run test

      - name: Print debug logs
        if: failure()
        run: find . -type f -name "*debug.log" | xargs cat

But each time the github action runs, i get the following error

Error: Invalid or corrupt jarfile /home/runner/work/project-firebase/project-firebase/functions/$GITHUB_WORKSPACE/emulator-cache/pubsub-emulator-0.1.0/pubsub-emulator/lib/cloud-pubsub-emulator-0.1-SNAPSHOT-all.jar

enter image description here

0

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.