No value found for 'git_url' when using fastlane in Github Actions

Viewed 1249

I am using Github Action to build flutter project, when using fastlane match to publish. Shows this error:

+---------------------------+-----------------------------------------------------+
|                                  Lane Context                                   |
+---------------------------+-----------------------------------------------------+
| DEFAULT_PLATFORM          | ios                                                 |
| PLATFORM_NAME             | ios                                                 |
| LANE_NAME                 | ios beta                                            |
| KEYCHAIN_PATH             | ~/Library/Keychains/***                  |
| ORIGINAL_DEFAULT_KEYCHAIN | "/Users/runner/Library/Keychains/login.keychain-db" |
+---------------------------+-----------------------------------------------------+
[13:09:50]: No value found for 'git_url'

+------+------------------+-------------+
|           fastlane summary            |
+------+------------------+-------------+
| Step | Action           | Time (in s) |
+------+------------------+-------------+
| 1    | update_fastlane  | 2           |
| 2    | default_platform | 0           |
| 3    | is_ci            | 0           |
| 4    | create_keychain  | 0           |
| 5    | is_ci            | 0           |
|    | match            | 0           |
+------+------------------+-------------+


[!] No value found for 'git_url'
[13:09:50]: fastlane finished with errors
Error: Process completed with exit code 1.

this is my fastlane match file:

git_url(ENV['GIT_URL'])

storage_mode("git")

type("adhoc") # The default type, can be: appstore, adhoc, enterprise or development

app_identifier(["com.earth.dolphin"])
username(ENV['APPLE_ID']) # Your Apple Developer Portal username

and this is the secrets define:

enter image description here

I found the log output In the config file './fastlane/Matchfile' you have the line username, but didn't provide any value . It shows the github actions fastlane match file could not read Github Secrets. what I am missing and what should I do to make it work?

2 Answers

before using the GIT_URL, should add to env in the workflow like this:

- name: Deploy to TestFlight/PGY
      run: |
        cd ./ios && bundle exec fastlane beta
      env:
        APPLE_ID: ${{ secrets.APPLE_ID }}
        GIT_URL: ${{ secrets.GIT_URL }}
        PGY_USER_KEY: ${{ secrets.PGY_USER_KEY }}
        PGY_API_KEY: ${{ secrets.PGY_API_KEY }}
        TEAM_ID: ${{ secrets.TEAM_ID }}
        ITC_TEAM_ID: ${{ secrets.ITC_TEAM_ID }}
        FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
        FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
        FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
        FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
        MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
        MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
        MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
        DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS: ${{ secrets.DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS }}

then you can using it in fastlane file.

Ensure your Matchfile is in your Fastlane folder.

Related