fabasoad / setup-enry-action

This GitHub action installs enry CLI tool.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setup Enry GitHub Action

Stand With Ukraine GitHub release functional-tests pre-commit

This action sets up an enry tool.

Supported OS: Linux, macOS.

Inputs

Name Required Description Default Possible values
version No Enry version that can be found here 1.2.0 1.1.0, 1.0.0, etc.

Usage

name: Setup Enry

on: push

jobs:
  example:
    name: Example
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@main
      - uses: fabasoad/setup-enry-action@main
      - name: Run CLI
        run: enry

Result

Run enry
59.57%  HTML
21.29%  JavaScript
14.25%  TypeScript
4.89%   CSS

Useful examples

Convert to json

# Simple output
enry
59.57%  HTML
21.29%  JavaScript
14.25%  TypeScript
4.89%   CSS

# Convert to JSON
echo "{$(enry | sed 's/^\(.*\)\t\(.*\)$/\"\2\":\"\1\"/' | paste -sd "," -)}"
{"HTML":"59.57%","JavaScript":"21.29%","TypeScript":"14.25%","CSS":"4.89%"}

About

This GitHub action installs enry CLI tool.

License:MIT License