From 3591bed418d0c33b751c9fde1baf0ee25e09fd6c Mon Sep 17 00:00:00 2001 From: Oleg Smirnov Date: Fri, 7 Feb 2025 20:50:58 +0400 Subject: [PATCH] Use dependabot to check for updates in JSON Schema test suite --- .github/dependabot.yml | 9 +++ .github/workflows/check-test-suite-update.yml | 55 ------------------- 2 files changed, 9 insertions(+), 55 deletions(-) delete mode 100644 .github/workflows/check-test-suite-update.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ab032a7d..31f3c3bf 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -23,5 +23,14 @@ updates: assignees: - 'OptimumCode' directory: '/' + schedule: + interval: daily + - package-ecosystem: gitsubmodule + directory: "/" + labels: + - ignore + - tests + assignees: + - 'OptimumCode' schedule: interval: daily \ No newline at end of file diff --git a/.github/workflows/check-test-suite-update.yml b/.github/workflows/check-test-suite-update.yml deleted file mode 100644 index c0b3cd71..00000000 --- a/.github/workflows/check-test-suite-update.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Checks JSON schema test suite for updates - -on: - workflow_dispatch: - schedule: - - cron: '0 12 * * *' - -jobs: - check-updates: - runs-on: ubuntu-latest - env: - SUITE_PATH: test-suites/schema-test-suite - steps: - - name: 'Checkout Repository' - uses: actions/checkout@v4 - with: - token: ${{ secrets.PUSH_PAT }} - submodules: true - - name: Pull latest changes from JSON schema test suite - run: git submodule update --remote - - name: Check for updates - id: updates - run: | - DIFF=$(git diff) - HAS_UPDATES=false - if [[ "$DIFF" != "" ]]; then - HAS_UPDATES=true - else - echo "No updates" - fi - echo "has-updates=$HAS_UPDATES" >> $GITHUB_OUTPUT - cd ${SUITE_PATH} - SUITE_SHA=$(git rev-parse --short HEAD) - echo "branch=suite-${SUITE_SHA}" >> $GITHUB_OUTPUT - - name: Commit changes to new branch - if: steps.updates.outputs.has-updates == 'true' - uses: EndBug/add-and-commit@v9 - with: - add: "['${{ env.SUITE_PATH }}']" - default_author: github_actions - message: "Update JSON schema test-suite" - new_branch: ${{ steps.updates.outputs.branch }} - - name: Create PR for version update - if: steps.updates.outputs.has-updates == 'true' - env: - GH_TOKEN: ${{ secrets.PUSH_PAT }} - run: > - gh pr create --title "Update JSON schema test-suite" - --body "Automated update" - --head ${{ steps.updates.outputs.branch }} - --base main - --reviewer OptimumCode - --label ignore - --label tests -