Skip to content

import_from_git

Community Action Reference: Inspected directly from Fastlane core ruby gem definitions.

Supported Platforms: ios, android, mac

Import another Fastfile from a remote git repository to use its lanes

Details

This is useful if you have shared lanes across multiple apps and you want to store the Fastfile in a remote git repository.

Parameters & Options

Total options available: 7

Key Type Env Variable Default Required Description
url String - - No The URL of the repository to import the Fastfile from
branch String - HEAD No The branch or tag to check-out on the repository
dependencies Array - [] No The array of additional Fastfiles in the repository
path String - fastlane/Fastfile No The path of the Fastfile in the repository
version Array - - No The version to checkout on the repository. Optimistic match operator or multiple conditions can be used to select the latest version within constraints
cache_path String - - No The path to a directory where the repository should be cloned into. Defaults to nil, which causes the repository to be cloned on every call, to a temporary directory
git_extra_headers Array - [] No An optional list of custom HTTP headers to access the git repo (Authorization: Basic <YOUR BASE64 KEY>, Cache-Control: no-cache, etc.)

Examples

import_from_git(
url: "git@github.com:fastlane/fastlane.git", # The URL of the repository to import the Fastfile from.
branch: "HEAD", # The branch to checkout on the repository.
path: "fastlane/Fastfile", # The path of the Fastfile in the repository.
version: "~> 1.0.0" # The version to checkout on the repository. Optimistic match operator can be used to select the latest version within constraints.
)
import_from_git(
url: "git@github.com:fastlane/fastlane.git", # The URL of the repository to import the Fastfile from.
branch: "HEAD", # The branch to checkout on the repository.
path: "fastlane/Fastfile", # The path of the Fastfile in the repository.
version: [">= 1.1.0", "< 2.0.0"], # The version to checkout on the repository. Multiple conditions can be used to select the latest version within constraints.
cache_path: "~/.cache/fastlane/imported", # A directory in which the repository will be added, which means that it will not be cloned again on subsequent calls.
git_extra_headers: ["Authorization: Basic <YOUR BASE64 KEY>", "Cache-Control: no-cache"]
)

Source & Upstream