{"id":26932495,"url":"https://github.com/norwd/fmtya","last_synced_at":"2025-07-15T19:17:24.606Z","repository":{"id":64408498,"uuid":"569482916","full_name":"norwd/fmtya","owner":"norwd","description":"GitHub Action to run yamlfmt","archived":false,"fork":false,"pushed_at":"2024-11-07T20:23:13.000Z","size":208,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-19T13:46:39.760Z","etag":null,"topics":["actions","composite-action","github-action","github-actions","reusable-workflow","reusable-workflows","tag-management","yamlfmt"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/norwd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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":{"custom":["https://crisisrelief.un.org/ukraine-crisis"]}},"created_at":"2022-11-22T23:36:49.000Z","updated_at":"2024-11-06T02:11:44.000Z","dependencies_parsed_at":"2024-11-07T20:30:44.447Z","dependency_job_id":"336c9d6b-7a0a-469d-bbec-fd9c94811713","html_url":"https://github.com/norwd/fmtya","commit_stats":{"total_commits":167,"total_committers":3,"mean_commits":"55.666666666666664","dds":"0.12574850299401197","last_synced_commit":"11c4eb4d55f8a465564cbef9aabb3e149d4a6247"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/norwd/fmtya","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norwd%2Ffmtya","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norwd%2Ffmtya/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norwd%2Ffmtya/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norwd%2Ffmtya/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/norwd","download_url":"https://codeload.github.com/norwd/fmtya/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norwd%2Ffmtya/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265453770,"owners_count":23768203,"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":["actions","composite-action","github-action","github-actions","reusable-workflow","reusable-workflows","tag-management","yamlfmt"],"created_at":"2025-04-02T08:26:57.274Z","updated_at":"2025-07-15T19:17:24.568Z","avatar_url":"https://github.com/norwd.png","language":null,"funding_links":["https://crisisrelief.un.org/ukraine-crisis"],"categories":[],"sub_categories":[],"readme":"# fmtya\n\nGitHub Action to run [yamlfmt]\n\n\u003cimg src=\"/../../../../norwd/human/blob/main/docs/automatic-logo.svg\" height=\"50\" /\u003e\n\n## Usage\n\n### Basic Setup\n\nThe following is a reasonable, bare-minimum, setup.\nIt runs `fmtya` with all the settings set to their default values.\nThis will run `yamlfmt` on the repository and if any yaml files are reformatted, it will commit them back to the branch that was pushed.\n\nNote that if the default token is used, GitHub Action workflow files cannot be formatted.\nThis is due to a limitation in GitHub's permissions system. See the [advanced setup] example to see how to format workflow files.\n\n```yaml\n---\n\nname: \"Format yaml files\"\n\non:\n  push:\n\njobs:\n  yamlfmt:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: norwd/fmtya@v1\n        with:\n          exclude-files: '.github/workflows/*.{yaml,yml}'\n```\n\n### Advanced Setup\n\nA more advanced setup can customise everything from the commit's message down to the specific version of the `yamlfmt` backend!\nThe configuration options `fmtya` uses are loosely based on the [`.yamlfmt`] file format.\n\n```yaml\n---\n\nname: \"Format yaml files\"\n\non:\n  push:\n\njobs:\n  yamlfmt:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: norwd/fmtya@v1\n        with:\n\n          # Due to how GitHub's permissions system is set up, the default token\n          # does not have the necessary access to update workflow files. If you\n          # want to want `fmtya` to format the files in the `.github/workflows`\n          # directory, you will need to set up a PAT with at least write access\n          # to both the `repo` and `workflows` permissions.\n          token: ${{ secrets.\u003cYOUR_PAT\u003e }}\n\n          # By default, `fmtya` uses the latest available version of `yamlfmt`.\n          # This may result changes to the behaviour of `fmtya`, for example if\n          # a major version of `yamlfmt` is released. If you prefer to manually\n          # select a specific version of `yamlfmt`, any released version can be \n          # pecifically requested.\n          yamlfmt-version: vX.Y.Z\n\n          # If there are files in your repo that follow a different convention,\n          # are auto-generated, or you just don't want to format for any reason\n          # at all, you can exclude specific files, or only selectively include\n          # certain files. The patterns are parsed by `yamlfmt`, and internally\n          # use https://github.com/bmatcuk/doublestar.\n          exclude-files: test/data/*.{yaml,yml}\n          include-files: |\n            **/*.{yaml,yml}\n            .yamlfmt\n\n          # Specific formatting options to configure the size of indents, or if\n          # yaml anchors or aliases should or shouldn't be allowed, can be used\n          # to control how yamlfmt formats the files in your repository.\n          indent-size: 2\n          line-ending-type: crlf\n          include-document-start: false\n          keep-line-breaks: false\n          disallow-anchors: true\n\n          # If the default commit message is too generic, or you want to create\n          # a custom commit message, for example, from the output of a previous\n          # workflow step, you can overwrite the commit message to any string.\n          commit-message: Reformat .yml files with yamlfmt\n\n          # When the formatting changes are made, they are committed by the bot\n          # account for GitHub Actions, and whoever pushed the unformatted file\n          # is listed as a co-author. To attribute the commit to a real person,\n          # or if you want to sign the commit, you can specify the username and\n          # email the same way you would to `git config user.name \u003cUSERNAME\u003e`.\n          commit-user-name: \u003cYOUR_GITHUB_USERNAME\u003e\n          commit-user-email: \u003cYOUR_GITHUB_EMAIL\n\n          # Not to be confused with signing a commit with the GPG key provided,\n          # a true boolean value for `signoff-on-commit` will add the `-s` flag\n          # to the commit command. This appends the `Signed-off-by` trailler to\n          # the commit message, certifying the commit.\n          #\n          # See also: http://developercertificate.org\n          signoff-on-commit: yes\n\n          # By default, the commits are not signed, which may make them show as\n          # unverified if any of the co-authors have vigilant mode turned on in\n          # their GitHub account settings. You can enable signed commits with a\n          # GPG private key stored in a secret, just be sure that the email set\n          # in the GPG key matches the email you set in `commit-user-email`!\n          signing-private-key: ${{ secrets.\u003cYOUR_GPG_SIGNING_KEY\u003e }}\n          signing-passphrase: ${{ secrets.\u003cYOUR_GPG_PASSWORD\u003e }}\n```\n\n[yamlfmt]: https://github.com/google/yamlfmt\n[advanced setup]: #advanced-setup\n[`.yamlfmt`]: https://github.com/google/yamlfmt#configuration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorwd%2Ffmtya","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnorwd%2Ffmtya","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorwd%2Ffmtya/lists"}