Home

Awesome

Validate Fastlane Supply Metadata

Docker build Docker image size

A Github Action to statically validate Fastlane metadata for Android (supply) using a simple validation logic written in Golang.

Features

Example Use Case

In one of my Android projects, I was facing a situation where other developers would translate the metadata for the Android app. But, there was no way to check its validity on a new Pull Request. I could create a dedicated CI job to run the fastlane supply action with the validate_only option. However,to run this job on PRs, I would need to expose a service account key for accessing the Google Play Developer API. Needless to say that it would be a security flaw.

This action uses a docker image built using a simple validation logic written in Go. It validates the Fastlane metadata for Android against the constraints enforced by Google Play.

Usage

See v1 README if you're using v1.

on: [pull_request]
jobs:
  # required to run on Linux because this is a docker container action
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@v3
    - uses: ashutoshgngwr/validate-fastlane-supply-metadata@v2
      with:
        fastlaneDir: ./android-metadata # optional
        usePlayStoreLocales: true # optional
OptionDescriptionDefault
fastlaneDirDirectory where Fastlane Android metadata is located. It is the directory that contains individual locale directories../fastlane/metadata/android
usePlayStoreLocalesThrow an error if Google Play doesn't recognise a locale code. See available languages on Google Support.false

Without GitHub actions

The GitHub action runs 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:v2 -help

The default entry point accepts the following command-line flags.

-fastlane-path string
    path to the Fastlane Android metadata directory (default "./fastlane/metadata/android")
-ga-file-annotations bool
    enables file annotations for GitHub action (default: false)
-play-store-locales bool
    throw an error if a locale isn't recognised by Google Play (default: false)

License

Apache License 2.0