From 4e102757b507448f7b303a3b8e28fa245685e6de Mon Sep 17 00:00:00 2001 From: Krypton Date: Sun, 21 Jul 2024 13:21:13 +0200 Subject: [PATCH] chore: Move both workflows in a single one --- ...me-file.yml => update-generated-files.yml} | 25 ++++++++++++++- .github/workflows/update-json-file.yml | 32 ------------------- 2 files changed, 24 insertions(+), 33 deletions(-) rename .github/workflows/{update-readme-file.yml => update-generated-files.yml} (51%) delete mode 100644 .github/workflows/update-json-file.yml diff --git a/.github/workflows/update-readme-file.yml b/.github/workflows/update-generated-files.yml similarity index 51% rename from .github/workflows/update-readme-file.yml rename to .github/workflows/update-generated-files.yml index 0cd2f54..5303cd9 100644 --- a/.github/workflows/update-readme-file.yml +++ b/.github/workflows/update-generated-files.yml @@ -1,4 +1,4 @@ -name: Update README file +name: Update generated files on: push: @@ -30,3 +30,26 @@ jobs: git config --global user.email 'root@krypton.ninja' git commit -am "chore: Automatic README.md file update with accurate wordlists [skip ci]" git push + update_json_file: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.PAT }} + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Make JSON file + run: python tools/make_json.py + - name: Check if there are any changes + id: verify_diff + run: | + git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT + - name: Update JSON file + if: steps.verify_diff.outputs.changed == 'true' + run: | + git config --global user.name 'Krypton' + git config --global user.email 'root@krypton.ninja' + git commit -am "chore: Automatic wordlists.json file update with accurate wordlists [skip ci]" + git push diff --git a/.github/workflows/update-json-file.yml b/.github/workflows/update-json-file.yml deleted file mode 100644 index 7a75806..0000000 --- a/.github/workflows/update-json-file.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Update JSON file - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - update_json_file: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - token: ${{ secrets.PAT }} - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: "3.11" - - name: Make JSON file - run: python tools/make_json.py - - name: Check if there are any changes - id: verify_diff - run: | - git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT - - name: Update JSON file - if: steps.verify_diff.outputs.changed == 'true' - run: | - git config --global user.name 'Krypton' - git config --global user.email 'root@krypton.ninja' - git commit -am "chore: Automatic wordlists.json file update with accurate wordlists [skip ci]" - git push