diff --git a/README.md b/README.md index 7d9f9b3..0e17c28 100644 --- a/README.md +++ b/README.md @@ -27,16 +27,17 @@ jobs: uses: SoftwareUnderstanding/rs-metacheck-action@0.3.1 # optional arguments with: - input: https://github.com/$GITHUB_REPOSITORY # if input is omited it will use GITHUB_REPOSITORY url pitfalls_output: "./pitfalls_outputs" verbose: "false" + # config: ".github/workflow/rsmetacheck.toml" + # config-profile: "prerelease" # use to set a profile defined in config. Overides the active_profile defined in rsmetacheck.toml ``` ### Inputs | Input | Description | Required | Default | | ------------------- | ---------------------------------------------------------------------- | -------- | ------------------------- | -| `input` | One or more: GitHub/GitLab URLs, JSON files containing repositories. | **Yes** | | +| `input` | One or more: GitHub/GitLab URLs, JSON files containing repositories. | No | https://github.com/$GITHUB_REPOSITORY | | `skip_somef` | Skip SoMEF execution and analyze existing SoMEF output files directly. | No | `false` | | `pitfalls_output` | Directory to store pitfall JSON-LD files. | No | `./pitfalls_outputs` | | `somef_output` | Directory to store SoMEF output files. | No | `./somef_outputs` | @@ -45,7 +46,8 @@ jobs: | `branch` | Branch of the repository to analyze. | No | | | `generate_codemeta` | Generate codemeta files for each repository. | No | `false` | | `verbose` | Include both detected AND undetected pitfalls in the output JSON-LD. | No | `false` | -| `config` | Specify the location of the `rsmetacheck.toml` to define the configuration. RSMetaCheck automatically detects a .rsmetacheck.toml (or rsmetacheck.toml) file at the working directory. | No | `rsmetacheck.toml` | +| `config` | Specify the location of the `rsmetacheck.toml` to define the configuration. RSMetaCheck automatically detects a .rsmetacheck.toml (or rsmetacheck.toml) file at the working directory. | No | `rsmetacheck.toml` | +| `config-profile` | Specify the profile to use. SHould be defined in the config file | No | | ### Outputs diff --git a/action.yml b/action.yml index a7aa167..4942af2 100644 --- a/action.yml +++ b/action.yml @@ -41,6 +41,12 @@ inputs: description: "Include both detected AND undetected pitfalls in the output JSON-LD." required: false default: "false" + config: + description: "Path to a TOML configuration file for RsMetaCheck." + required: false + config_profile: + description: "Profile name in the TOML configuration file to use for RsMetaCheck." + required: false outputs: has_pitfalls: diff --git a/entrypoint.sh b/entrypoint.sh index aaf7744..36e12af 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -47,6 +47,14 @@ if [ -n "$INPUT_BRANCH" ]; then CMD="$CMD --branch \"$INPUT_BRANCH\"" fi +if [ -n "$INPUT_CONFIG" ]; then + CMD="$CMD --config \"$INPUT_CONFIG_FILE\"" +fi + +if [ -n "$INPUT_CONFIG_PROFILE" ]; then + CMD="$CMD --config-profile \"$INPUT_CONFIG_PROFILE\"" +fi + echo "Executing RsMetaCheck command:" echo "$CMD"