0

I am trying to create a CI/CD pipeline for Android project. What I want to achieve is to upload the debug build in Firebase App distribution when the github Action is triggered.

I am using https://github.com/marketplace/actions/firebase-app-distribution-action#firebase-app-distribution-github-action to upload the build in app distribution

I have also tried https://github.com/marketplace/actions/firebase-app-distribution

but getting the same issue in both the cases

Attaching the ScreenShot of the error getting during the github Action Github Action Error

Here is my workflow yaml file

name: Workflow_1

on:
  pull_request:
    branches: [ dev ]
    types:
      - closed


jobs:
  build:
    if: github.event.pull_request.merged == true
    runs-on: ubuntu-latest

    steps:
      # checking out the code to the environment
      - uses: actions/checkout@v2

      - name: set up Java
        uses: actions/setup-java@v2
        with:
          distribution: 'adopt'
          java-version: 11

      - name: Make gradlew executable
        run: chmod +x ./gradlew

#      - name: Build debug APK
#        run: ./gradlew assembleDebug

#      - name: Upload Debug APKs
#        uses: actions/upload-artifact@v2
#        with:
#          name: Test-App
#          path: app/build/outputs/
        
      - name: Firebase App Distribution3
        uses: hasretsariyer/firebase-app-distribution-github-action@v1.0
        with:
          app_id: "${{ secrets.FIREBASE_APP_ID }}"
          firebase_token: "${{ secrets.FIREBASE_TOKEN }}"
          app_file: app-debug.apk
          tester_groups: demoGRP

I searched the web not getting this issue linked with github Action.

Update:

By guessing from the comments below, I edited the checkout part in yaml file

      - uses: actions/checkout@v2
        with:
          set-safe-directory: '*'

which lead to another issues: (Screenshot below) github repo error

Shadman Akhtar
  • 99
  • 2
  • 11
  • I believe that you already created an issue for this on the repo, right? https://github.com/hasretsariyer/firebase-app-distribution-github-action/issues/4 – Azeem Jan 18 '23 at 11:46
  • Does this answer your question? [git submodule update failed with 'fatal: detected dubious ownership in repository at'](https://stackoverflow.com/questions/72978485/git-submodule-update-failed-with-fatal-detected-dubious-ownership-in-repositor) – Azeem Jan 18 '23 at 12:02
  • Apart from the above similar question, please take a look at https://github.com/actions/checkout#usage. You may test with its `path` first to automatically create a parent directory under `GITHUB_WORKSPACE` root directory. See if that works. Otherwise, it also provides a `set-safe-directory` configuration so that you don't have run it manually, though it's default is `true` so it should already be working. – Azeem Jan 18 '23 at 12:06
  • @Azeem yes, i did created issue in repo, didn't get any response there yet. + I checked the web, and the message to add safe.directory in gitConfig is bit confusing, as how changing any config in my local machine can have any effect in github repo as there is no changes to commit. – Shadman Akhtar Jan 19 '23 at 11:33
  • @Azeem checked the action/checkout#usage but couldn't figure out the way out – Shadman Akhtar Jan 19 '23 at 11:35
  • Right. That command was to run in the workflow, not on your local clone. Did you try with `checkout: path:` config? – Azeem Jan 19 '23 at 11:44
  • Is `app-debug.apk` in the current directory? In the above commented `upload-artifact` step, the path is `app/build/outputs/`. Have you verified this part? Also, the step "Build debug APK" is also commented. From the docs (https://github.com/hasretsariyer/firebase-app-distribution-github-action#app_file) for `app_file`, it should be the path to where the built `.apk` or `.ipa` file resides. – Azeem Jan 19 '23 at 12:50

0 Answers0