{"id":20107137,"url":"https://github.com/juliojimenez/yamler","last_synced_at":"2026-04-06T01:12:54.435Z","repository":{"id":37820727,"uuid":"310612806","full_name":"juliojimenez/yamler","owner":"juliojimenez","description":"YAML Parsing GitHub Action","archived":false,"fork":false,"pushed_at":"2024-10-03T10:40:12.000Z","size":32855,"stargazers_count":10,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-31T10:44:17.511Z","etag":null,"topics":["github-actions","github-pages","jekyll","markdown-frontmatter","typescript","yaml","yaml-parser","yamler"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/juliojimenez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"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":"juliojimenez","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2020-11-06T14:02:02.000Z","updated_at":"2024-07-08T02:17:51.000Z","dependencies_parsed_at":"2023-12-18T01:22:03.719Z","dependency_job_id":"306c8ba0-cdfe-4c64-9131-6ef3244f5720","html_url":"https://github.com/juliojimenez/yamler","commit_stats":{"total_commits":101,"total_committers":5,"mean_commits":20.2,"dds":0.3267326732673267,"last_synced_commit":"e13e7512634e34c43f1d474f480fbfe6d6a4a8e7"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliojimenez%2Fyamler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliojimenez%2Fyamler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliojimenez%2Fyamler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliojimenez%2Fyamler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juliojimenez","download_url":"https://codeload.github.com/juliojimenez/yamler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224500009,"owners_count":17321605,"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","github-pages","jekyll","markdown-frontmatter","typescript","yaml","yaml-parser","yamler"],"created_at":"2024-11-13T17:55:54.250Z","updated_at":"2026-04-06T01:12:54.379Z","avatar_url":"https://github.com/juliojimenez.png","language":"JavaScript","funding_links":["https://github.com/sponsors/juliojimenez"],"categories":[],"sub_categories":[],"readme":"[![yamler Tests](https://github.com/juliojimenez/yamler/actions/workflows/tests.yml/badge.svg)](https://github.com/juliojimenez/yamler/actions/workflows/tests.yml) [![yamler Test Job](https://github.com/juliojimenez/yamler/actions/workflows/main.yml/badge.svg)](https://github.com/juliojimenez/yamler/actions/workflows/main.yml) ![GitHub release (with filter)](https://img.shields.io/github/v/release/juliojimenez/yamler)\n\n# yamler\n\n- [Usage](#usage)\n- [Output](#output)\n- [Accessing Output Variables](#accessing-output-variables)\n- [GitHub Pages (Jekyll) Front Matter](#github-pages-jekyll-front-matter)\n\n**yamler** is a GitHub Action that parses an entire YAML document and makes all elements available as GitHub Workflow output variables.\n\nSupport for multiple documents is provided by the `multidoc` attribute (default: `false`).\n\n\u003e YAML uses three dashes (`---`) to separate directives from document content. This also serves to signal the start of a document if no directives are present. (https://yaml.org/spec/1.2.2/#22-structures)\n\n## Usage\n\n```\n- name: yamler\n  uses: juliojimenez/yamler@v1.1.0\n  id: yamler\n  with:\n    yaml-file: \"example.yaml\"\n    multidoc: true|false\n```\n\n## Output\n\nyamler outputs the entire document as _yamler-formatted_ output variable names. This serves as a good reference when the YAML document contains tags with characters not supported by GitHub Workflow variable names. yamler will automatically transform tags into friendly variable names.\n\nIn this example, the test file used is derived from [yaml.org](https://yaml.org). A deeper _number_ array was added to test for types other than string, object, and array.\n\n```\n***** Output Variables *****\nyaml\nwhat_it_is\nyaml_resources__yaml_1_2_3rd_edition\nyaml_resources__yaml_1_1_2nd_edition\nyaml_resources__yaml_1_0_1st_edition\nyaml_resources__yaml_issues_page\nyaml_resources__yaml_mailing_list\nyaml_resources__yaml_irc_channel\nyaml_resources__yaml_cookbook_ruby\nyaml_resources__yaml_reference_parser\nprojects__c_cpp_libraries__0\nprojects__c_cpp_libraries__1\nprojects__c_cpp_libraries__2\nprojects__ruby__0\nprojects__ruby__1\nprojects__ruby__2\nprojects__python__0\nprojects__python__1\nprojects__java__0\nprojects__java__1\nprojects__java__2\nprojects__java__3\nprojects__perl_modules__0\nprojects__perl_modules__1\nprojects__perl_modules__2\nprojects__perl_modules__3\nprojects__perl_modules__4\nprojects__cs__net__0\nprojects__cs__net__1\nprojects__php__0\nprojects__php__1\nprojects__php__2\nprojects__ocaml__0\nprojects__javascript__0\nprojects__javascript__1\nprojects__actionscript__0\nprojects__haskell__0\nprojects__others__0\nrelated_projects__0\nrelated_projects__1\nrelated_projects__2\nrelated_projects__3\nrelated_projects__4\nrelated_projects__5\nnumber_object__number_sub_object__number_sub_sub_array__0\nnumber_object__number_sub_object__number_sub_sub_array__1\nnumber_object__number_sub_object__number_sub_sub_array__2\nnews__0\nnews__1\nnews__2\nnews__3\nnews__4\nnews__5\nnews__6\nnews__7\nnews__8\nnews__9\nnews__10\nnews__11\nnews__12\nnews__13\nnews__14\nnews__15\nnews__16\nnews__17\nnews__18\nnews__19\nnews__20\nnews__21\nnews__22\nnews__23\nnews__24\nnews__25\nnews__26\nnews__27\nnews__28\nnews__29\nnews__30\nnews__31\nnews__32\nnews__33\nnews__34\nnews__35\nnews__36\nnews__37\n```\n\nMultiple documents are zero-indexed and variable names are prefixed with `docN`. Formatting for the rest of the variable name remains the same as above.\n\n```\n***** Output Variables *****\ndoc0__name\ndoc0__purpose\ndoc1__yaml\ndoc1__what_it_is\ndoc1__yaml_resources__yaml_1_2_3rd_edition\ndoc1__yaml_resources__yaml_1_1_2nd_edition\ndoc1__yaml_resources__yaml_1_0_1st_edition\ndoc1__yaml_resources__yaml_issues_page\ndoc1__yaml_resources__yaml_mailing_list\ndoc1__yaml_resources__yaml_irc_channel\ndoc1__yaml_resources__yaml_cookbook_ruby\ndoc1__yaml_resources__yaml_reference_parser\ndoc1__projects__c_cpp_libraries__0\ndoc1__projects__c_cpp_libraries__1\ndoc1__projects__c_cpp_libraries__2\ndoc1__projects__ruby__0\ndoc1__projects__ruby__1\ndoc1__projects__ruby__2\ndoc1__projects__python__0\ndoc1__projects__python__1\ndoc1__projects__java__0\ndoc1__projects__java__1\ndoc1__projects__java__2\ndoc1__projects__java__3\ndoc1__projects__perl_modules__0\ndoc1__projects__perl_modules__1\ndoc1__projects__perl_modules__2\ndoc1__projects__perl_modules__3\ndoc1__projects__perl_modules__4\ndoc1__projects__cs__net__0\ndoc1__projects__cs__net__1\ndoc1__projects__php__0\ndoc1__projects__php__1\ndoc1__projects__php__2\ndoc1__projects__ocaml__0\ndoc1__projects__javascript__0\ndoc1__projects__javascript__1\ndoc1__projects__actionscript__0\ndoc1__projects__haskell__0\ndoc1__projects__others__0\ndoc1__related_projects__0\ndoc1__related_projects__1\ndoc1__related_projects__2\ndoc1__related_projects__3\ndoc1__related_projects__4\ndoc1__related_projects__5\ndoc1__number_object__number_sub_object__number_sub_sub_array__0\ndoc1__number_object__number_sub_object__number_sub_sub_array__1\ndoc1__number_object__number_sub_object__number_sub_sub_array__2\ndoc1__news__0\ndoc1__news__1\ndoc1__news__2\ndoc1__news__3\ndoc1__news__4\ndoc1__news__5\ndoc1__news__6\ndoc1__news__7\ndoc1__news__8\ndoc1__news__9\ndoc1__news__10\ndoc1__news__11\ndoc1__news__12\ndoc1__news__13\ndoc1__news__14\ndoc1__news__15\ndoc1__news__16\ndoc1__news__17\ndoc1__news__18\ndoc1__news__19\ndoc1__news__20\ndoc1__news__21\ndoc1__news__22\ndoc1__news__23\ndoc1__news__24\ndoc1__news__25\ndoc1__news__26\ndoc1__news__27\ndoc1__news__28\ndoc1__news__29\ndoc1__news__30\ndoc1__news__31\ndoc1__news__32\ndoc1__news__33\ndoc1__news__34\ndoc1__news__35\ndoc1__news__36\ndoc1__news__37\n```\n\n## Accessing Output Variables\n\nyamler preserves document structure using double-underscore (\\_\\_) notation. If a value is located at `foo.bar`, the yamler output variable will become `foo__bar`. Arrays are indexed in a similar way, the element `bar.foo[5]`can be accessed with yamler at`bar__foo__5`.\n\n```\n# Use the output from the yamler step\n- name: Output Test\n  run: |\n    echo \"${{ steps.yamler.outputs.yaml }}\"\n    echo \"${{ steps.yamler.outputs.what_it_is }}\"\n    echo \"${{ steps.yamler.outputs.yaml_resources__yaml_1_2_3rd_edition }}\"\n```\n\nIn a multidoc scenario...\n\n```\n# Use the output from the yamler step\n- name: Output Test\n  run: |\n    echo \"${{ steps.yamler.outputs.doc0__name }}\"\n    echo \"${{ steps.yamler.outputs.doc0__purpose }}\"\n```\n\n## GitHub Pages (Jekyll) Front Matter\n\nyamler can be used to parse YAML front matter in GitHub Pages (Jekyll) markdown files. The front matter must be the first thing in the file and must take the form of valid YAML set between triple-dashed lines. Here is a basic example:\n\n```yaml\n---\ntitle: Front Matter\npermalink: /docs/front-matter/\nredirect_from: /docs/frontmatter/index.html\nreviewed_on: 2025-07-07\nreviewed_by: juliojimenez\n---\n\n# Example\n\nBlah blah blah\n```\n\nHere is an example of how to use yamler to parse the front matter from a markdown file:\n\n```yaml\n- name: yamler\n  uses: juliojimenez/yamler@v1.1.0\n  id: yamler\n  with:\n    yaml-file: \"doc.md\"\n    multidoc: true\n\n- name: Output\n  run: |\n    echo \"${{ steps.yamler.outputs.doc0__title }}\"\n    echo \"${{ steps.yamler.outputs.doc0__permalink }}\"\n    echo \"${{ steps.yamler.outputs.doc0__redirect_from }}\"\n    echo \"${{ steps.yamler.outputs.doc0__reviewed_on }}\"\n    echo \"${{ steps.yamler.outputs.doc0__reviewed_by }}\"\n```\n\n```\nFront Matter\n/docs/front-matter/\n/docs/frontmatter/index.html\n2024-07-07\njuliojimenez\n```\n\nThis is a great way to validate front matter attributes in markdown files and make it available for further processing in GitHub Workflows. For example:\n\n- Ensuring all markdown files have a set of required attributes.\n- Listing documents that have not been reviewed in a while.\n- Notifying authors when their documents are out of date.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliojimenez%2Fyamler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliojimenez%2Fyamler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliojimenez%2Fyamler/lists"}