diff --git a/README.md b/README.md new file mode 100644 index 0000000..81e285f --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# Milo Action +This action runs Milo to find HTML issues and other details in the code. + +## Usage +To use this action you should add the `wawandco/milo-action` Actin to your existing workflow. The configuration looks something like this: + +```yaml +name: "CI" +on: ["push", "pull_request"] + +jobs: + ci: + name: "Run CI" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: wawandco/milo-action@v0.1.0 +``` + +This will use the latest version of Milo and analyze the root folder of your source. One important thing is to do the checkout of the repo before adding the milo action. + +## Options + +### `version` +Allows to specify the version of Milo that will be used to analyze your HTML code. Defaults to `latest`. + +### `folder` +Allows to specify the folder that will be analyzed by Milo. Defaults to `.`. + + diff --git a/action.yml b/action.yml index bb7cbbd..aa92ea3 100644 --- a/action.yml +++ b/action.yml @@ -7,13 +7,18 @@ inputs: default: "." version: description: "Version of milo to use" - default: "v0.6.0" + default: "latest" runs: using: "composite" steps: - id: install_milo run: | - wget https://github.com/wawandco/milo/releases/download/${{inputs.version}}/milo_Linux_x86_64.tar.gz + export URL=https://github.com/wawandco/milo/releases/download/${{inputs.version}}/milo_Linux_x86_64.tar.gz + if [ "${{inputs.version}}" == "latest" ]; then + URL="https://github.com/wawandco/milo/releases/latest/download/milo_Linux_x86_64.tar.gz" + fi + + wget $URL tar -xzf milo_Linux_x86_64.tar.gz sudo mv milo /usr/local/bin/milo shell: bash