From 38ae88d403f1eb8dd5a0e3e15588451c289046f5 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 16 Mar 2022 11:02:50 +0100 Subject: [PATCH] Update and rename weekly_sortjson.yaml to weekly_activities.yaml --- .github/workflows/weekly_activities.yaml | 75 ++++++++++++++++++++++++ .github/workflows/weekly_sortjson.yaml | 31 ---------- 2 files changed, 75 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/weekly_activities.yaml delete mode 100644 .github/workflows/weekly_sortjson.yaml diff --git a/.github/workflows/weekly_activities.yaml b/.github/workflows/weekly_activities.yaml new file mode 100644 index 000000000..5181bcbad --- /dev/null +++ b/.github/workflows/weekly_activities.yaml @@ -0,0 +1,75 @@ +# yamllint disable rule:line-length +--- +name: weekly activities + +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@v3 + with: + title: Json sort weekly + branch-suffix: timestamp + commit-message: Sorted json + + compress_images: + name: calibreapp/image-actions + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Compress Images + id: calibre + uses: calibreapp/image-actions@main + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + compressOnly: true + - name: Create New Pull Request If Needed + if: steps.calibre.outputs.markdown != '' + uses: peter-evans/create-pull-request@v3 + with: + title: Compressed Images Nightly + branch-suffix: timestamp + commit-message: Compressed Images + body: ${{ steps.calibre.outputs.markdown }} + + beautify: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + - uses: actions/setup-python@v1 + - name: "Install beautify" + uses: BSFishy/pip-action@v1 + with: + packages: | + beautysh + - name: "Run beautify" + run: | + find . -name '*.sh' | xargs beautysh --indent-size 4 + - name: Create New Pull Request If Needed + uses: peter-evans/create-pull-request@v3 + with: + title: "Apply beautysh changes" + branch-suffix: timestamp + commit-message: Beautify bash diff --git a/.github/workflows/weekly_sortjson.yaml b/.github/workflows/weekly_sortjson.yaml deleted file mode 100644 index ae812a5ee..000000000 --- a/.github/workflows/weekly_sortjson.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# yamllint disable rule:line-length ---- -name: 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@v3 - with: - title: Json sort weekly - branch-suffix: timestamp - commit-message: Sorted json