mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-12 10:51:01 +01:00
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 4. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v3...v4) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
32 lines
789 B
YAML
32 lines
789 B
YAML
# yamllint disable rule:line-length
|
|
---
|
|
name: Weekly sort json
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 0 * * 0"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
sort_json:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v3
|
|
- 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 "::set-output name=changed::1"
|
|
done
|
|
shell: bash
|
|
- name: Create New Pull Request If Needed
|
|
if: steps.sort.outputs.changed != ''
|
|
uses: peter-evans/create-pull-request@v4
|
|
with:
|
|
title: Json sort weekly
|
|
branch-suffix: timestamp
|
|
commit-message: Sorted json
|