GitHub Action plugin for fastlane
fastlane-plugin-github_action to the rescue
This plugin will:
1. Prompt you if
setup_ci is not found in your
Running fastlane on a CI requires the environment to be setup properly. Calling the setup_ci action does that by configuring a new keychain that will be used for code signing with match
2. Create a Deploy Key on your match repository to be used from your GitHub Action
A Deploy Key is needed for GitHub Actions to access your match repository. This action creates a new SSH key and uses the public key for the Deploy Key on your match repository.
This will only get executed if the
match_repo options are specified.
dotenv file(s)3. Set the Deploy Key private key in secrets (along with secrets in your
The private key created for the Deploy Key is store encrypted in your repository secrets. The private key is stored under the name
Encrypted secrets will also get set for environment variables from dotenv files specified by the
4. Generate a Workflow YAML file to use
A Workflow YAML file is created at
.github/workflows/fastlane.yml. This will enable your repository to start running GitHub Actions right away - once committed and pushed
MATCH_DEPLOY_KEY secret and executing
ssh-add. All of your other encrypted secrets will also be loaded into environment variables for you as well.
An example can be seen here.
This project is a fastlane plugin. To get started with
fastlane-plugin-github_action, add it to your project by running:
fastlane add_plugin github_action
For macOS, libsodium can be installed with:
brew install libsodium
See https://github.com/RubyCrypto/rbnacl/wiki/Installing-libsodium for more installation instructions.
fastlane-plugin-github_action can be execute either direction on the command line with
bundle exec fastlane run github_action or by adding
github_action to your
bundle exec fastlane run github_action \ api_token:"your-github-personal-access-token-with-all-repo-permissions" \ org:"your-org" \ repo:"your-repo"
bundle exec fastlane run github_action \ api_token:"your-github-personal-access-token-with-all-repo-permissions" \ org:"your-org" \ repo:"your-repo" \ match_org:"your-match-repo-org" \ match_repo:"your-match-repo" \ dotenv_paths:"fastlane/.env.secret,fastlane/.env.secret2"
lane :init_ci do github_action( api_token: "your-github-personal-access-token-with-all-repo-permissions", org: "your-org", repo: "your-repo", match_org: "your-match-repo-org", # optional match_repo: "your-match-repo", # optional dotenv_paths: ["fastlane/.env.secret", "fastlane/.env.secret2"] # optional ) end
Once installed, information and help for an action can be printed out with this command:
fastlane action github_action # or any action included with this plugin
||The server url. e.g. 'https://your.internal.github.host/api/v3' (Default: 'https://api.github.com')|
||Personal API Token for GitHub - generate one at https://github.com/settings/tokens|
||Name of organization of the repository for GitHub Actions|
||Name of repository for GitHub Actions|
||Name of organization of the match repository|
||Name of match repository|
||Paths of .env files to parse|
Check out the example
Fastfile to see how to use this plugin. Try it by cloning the repo, running
fastlane install_plugins and
bundle exec fastlane test.
Run tests for this plugin
To run both the tests, and code style validation, run
To automatically fix many of the styling issues, use
Issues and Feedback
For any other issues and feedback about this plugin, please submit it to this repository.
If you have trouble using plugins, check out the Plugins Troubleshooting guide.
Using fastlane Plugins
For more information about how the
fastlane plugin system works, check out the Plugins documentation.
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.