{"id":15780201,"url":"https://github.com/rlespinasse/slugify-value","last_synced_at":"2025-05-07T22:30:10.032Z","repository":{"id":37824659,"uuid":"414746855","full_name":"rlespinasse/slugify-value","owner":"rlespinasse","description":"Github Action to slugify a value","archived":false,"fork":false,"pushed_at":"2025-04-12T13:18:44.000Z","size":49,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"v1.x","last_synced_at":"2025-04-27T17:02:12.267Z","etag":null,"topics":["github-actions","hacktoberfest","slug","utilities"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rlespinasse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"rlespinasse"}},"created_at":"2021-10-07T20:22:47.000Z","updated_at":"2025-04-12T13:18:46.000Z","dependencies_parsed_at":"2024-01-07T09:33:14.720Z","dependency_job_id":"0ca91420-659b-4175-8146-27d7e2114208","html_url":"https://github.com/rlespinasse/slugify-value","commit_stats":{"total_commits":30,"total_committers":5,"mean_commits":6.0,"dds":0.1333333333333333,"last_synced_commit":"ee83cf0807ec829fed209377aa7b2fdd78cffcf6"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlespinasse%2Fslugify-value","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlespinasse%2Fslugify-value/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlespinasse%2Fslugify-value/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlespinasse%2Fslugify-value/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rlespinasse","download_url":"https://codeload.github.com/rlespinasse/slugify-value/tar.gz/refs/heads/v1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252964728,"owners_count":21832737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","hacktoberfest","slug","utilities"],"created_at":"2024-10-04T18:40:51.601Z","updated_at":"2025-05-07T22:30:10.006Z","avatar_url":"https://github.com/rlespinasse.png","language":"Shell","funding_links":["https://github.com/sponsors/rlespinasse"],"categories":[],"sub_categories":[],"readme":"# Slugify\n\n\u003e [!NOTE]\n\u003e A GitHub Action that transforms input strings into URL-friendly slugs\n\nThis action creates standardized slug versions of your input variables, offering multiple formatting options:\n\n## Output Formats\n\n- `\u003cenv name\u003e_SLUG`\n  - Converts text to lowercase\n  - Replaces special characters with **-** (except **0-9**, **a-z**, **.**, and **_**)\n  - Removes leading and trailing **-$*\n  - Limits string length to **63** characters\n- `\u003cenv name\u003e_SLUG_CS`\n  - Same as `_SLUG` but preserves original case sensitivity\n- `\u003cenv name\u003e_SLUG_URL` and `\u003cenv name\u003e_SLUG_URL_CS`\n  - Same as their respective base versions (`_SLUG` or `_SLUG_CS`)\n  - Additionally replaces **.** and **_** with **-**\n  - Perfect for URL-safe strings\n\nEach output variable maintains consistent formatting rules while serving different use cases, from basic slugification to URL-ready strings.\n\n## Usage\n\n- Slugify a value and store it using a key\n\n  ```yaml\n  - uses: rlespinasse/slugify-value@v1.x\n    with:\n      key: KEY_NAME\n      value: value_to_slugify\n  ```\n\n  Will make available\n\n  - `KEY_NAME`\n  - `KEY_NAME_SLUG`\n  - `KEY_NAME_SLUG_CS`\n  - `KEY_NAME_SLUG_URL`\n  - `KEY_NAME_SLUG_URL_CS`\n\n- Slugify the value of an environment variable\n\n  ```yaml\n  - uses: rlespinasse/slugify-value@v1.x\n    with:\n      key: EXISTING_ENV_VAR\n  ```\n\n  Will make available\n\n  - `EXISTING_ENV_VAR_SLUG`\n  - `EXISTING_ENV_VAR_SLUG_CS`\n  - `EXISTING_ENV_VAR_SLUG_URL`\n  - `EXISTING_ENV_VAR_SLUG_URL_CS`\n\n- Slugify the value of an environment variable with prefix\n\n  ```yaml\n  - uses: rlespinasse/slugify-value@v1.x\n    with:\n      key: EXISTING_ENV_VAR\n      prefix: CI_\n  ```\n\n  Will make available\n\n  - `CI_EXISTING_ENV_VAR`\n  - `CI_EXISTING_ENV_VAR_SLUG`\n  - `CI_EXISTING_ENV_VAR_SLUG_CS`\n  - `CI_EXISTING_ENV_VAR_SLUG_URL`\n  - `CI_EXISTING_ENV_VAR_SLUG_URL_CS`\n\n- Slugify a value with a different slug length\n\n  ```yaml\n  - uses: rlespinasse/slugify-value@v1.x\n    with:\n      key: EXISTING_ENV_VAR\n      slug-maxlength: 80\n  ```\n\n  Will produce SLUG variables with a 80-char length\n\n- Slugify a value without length limit\n\n  ```yaml\n  - uses: rlespinasse/slugify-value@v1.x\n    with:\n      key: EXISTING_ENV_VAR\n      slug-maxlength: \"nolimit\"\n  ```\n\n  Will produce SLUG variables without limiting the output length\n\n- Slugify a value without publishing the environment variables\n\n  ```yaml\n  - uses: rlespinasse/slugify-value@v1.x\n    with:\n      key: KEY_NAME\n      value: value_to_slugify\n      publish-env: false\n  ```\n\n  Will **not** make available\n\n  - `KEY_NAME`\n  - `KEY_NAME_SLUG`\n  - `KEY_NAME_SLUG_CS`\n  - `KEY_NAME_SLUG_URL`\n  - `KEY_NAME_SLUG_URL_CS`\n\n## Inputs\n\n| Input          | Description                                                                                           | Mandatory | Default |\n| -------------- | ----------------------------------------------------------------------------------------------------- | --------- | ------- |\n| key            | Environment variable that will hold the value and serve as prefix to slugified value                  | Yes       |         |\n| value          | The value to slugify. If not set the value will be taken from the `key` input as environment variable | No        |         |\n| prefix         | The value will be prepend to each generated variable                                                  | No        |         |\n| slug-maxlength | The value is a number or `nolimit` to reflect the length of the slug outputs                          | No        | 63      |\n| publish-env    | In addition of the action output, the slug values are publish as environment variables                | No        | true    |\n\n## Outputs\n\n| Output      | Description                     |\n| ----------- | ------------------------------- |\n| value       | The value to be slugify         |\n| slug        | Value Slug                      |\n| slug-cs     | Value Slug (Case-sensitive)     |\n| slug-url    | Value Slug URL                  |\n| slug-url-cs | Value Slug URL (Case-sensitive) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlespinasse%2Fslugify-value","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frlespinasse%2Fslugify-value","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlespinasse%2Fslugify-value/lists"}