Files
hassio-addons-avm/.github/workflows/weekly_sortjson.yaml
dependabot[bot] 69512b61fb Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-18 01:13:47 +00:00

33 lines
864 B
YAML

# yamllint disable rule:line-length
---
name: Weekly sort json
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
jobs:
sort_json:
if: github.repository_owner == 'alexbelgium'
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@v5
- name: Run script file
id: sort
run: |
for files in */*.json; do
echo "Sorting $files"
jq --sort-keys . "$files" > config2.json && cat config2.json > "$files" && rm config2.json
echo "changed=1" >> "$GITHUB_OUTPUT"
done
shell: bash
- name: Create New Pull Request If Needed
if: steps.sort.outputs.changed != ''
uses: peter-evans/create-pull-request@v5
with:
title: "Github bot : json sorted"
branch-suffix: timestamp
commit-message: "Github bot : json sorted"