In one of my Android projects, I was
facing a situation where other developers would translate Fastlane metadata for
the Android app. There was no way to check its validity on the new Pull Requests.
I even created a dedicated CI job to run
fastlane supply with
To run this job for PRs, I would need to expose the service account key
for accessing the Play Store which is a major security flaw.
This action uses a docker image to validate Fastlane's metadata. The docker image is built from the Go code in this repository. The Go code is ~300 lines of validation logic to test all the files in Fastlane metadata against the constraints from the Play Store listing.
on: [pull_request] jobs: # required to run on Linux because this is a docker container action runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: ashutoshgngwr/validate-fastlane-supply-metadata@v1 with: fastlaneDir: ./fastlane # optional. default is './fastlane'. # enable check to validate if a locale is supported by the Play Store Listing. usePlayStoreLocales: true # optional. default is false.
The GitHub action uses on a docker image under the hood. You can use it directly for environments other than GitHub actions.
docker run --rm --workdir /app --mount type=bind,source="$(pwd)",target=/app \ ashutoshgngwr/validate-fastlane-supply-metadata:v1 -help
The default entry point accepts the following command-line flags.
-fastlane-path string path to the Fastlane directory (default "./fastlane") -ga-file-annotations bool enables file annotations for GitHub action (default: false) -play-store-locales bool throw error if a locale isn't recognised by Play Store (default: false)