diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a3b3456..be6b4b7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,22 +4,22 @@ updates: directory: "/" schedule: interval: "weekly" - open-pull-requests-limit: 5 + open-pull-requests-limit: 0 - package-ecosystem: "npm" directory: "/frontend" schedule: interval: "weekly" - open-pull-requests-limit: 5 + open-pull-requests-limit: 0 - package-ecosystem: "docker" directory: "/" schedule: interval: "weekly" - open-pull-requests-limit: 5 + open-pull-requests-limit: 0 - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" - open-pull-requests-limit: 5 + open-pull-requests-limit: 0 diff --git a/.github/workflows/renovate-ci.yml b/.github/workflows/renovate-ci.yml new file mode 100644 index 0000000..7470965 --- /dev/null +++ b/.github/workflows/renovate-ci.yml @@ -0,0 +1,58 @@ +name: Renovate verification +on: + pull_request: + branches: [main] + types: [opened, synchronize, reopened, ready_for_review] + +permissions: + contents: read + +concurrency: + group: renovate-verify-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + verify: + name: Renovate dependency CI + runs-on: ubuntu-24.04 + timeout-minutes: 40 + steps: + - name: Select the dependency verification scope + id: scope + env: + IS_DEPENDENCY_UPDATE: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.id == 29139614 && startsWith(github.head_ref, 'renovate/') && github.head_ref != 'renovate/configure' }} + IS_ONBOARDING: ${{ github.event.pull_request.head.repo.full_name == github.repository && (github.head_ref == 'renovate/configure' || github.head_ref == 'chore/renovate-onboarding') }} + run: | + echo "deps=$IS_DEPENDENCY_UPDATE" >> "$GITHUB_OUTPUT" + echo "setup=$IS_ONBOARDING" >> "$GITHUB_OUTPUT" + if [[ "$IS_DEPENDENCY_UPDATE" == false && "$IS_ONBOARDING" == false ]]; then + echo "This pull request uses the repository's normal CI." + fi + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + if: steps.scope.outputs.deps == 'true' || steps.scope.outputs.setup == 'true' + with: + persist-credentials: false + - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 + if: steps.scope.outputs.setup == 'true' + with: + node-version: '26.13.1' + package-manager-cache: false + - name: Validate the Renovate configuration + if: steps.scope.outputs.setup == 'true' + run: npx --yes --package renovate@45.1.2 -- renovate-config-validator --strict + - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 + if: steps.scope.outputs.deps == 'true' + with: + node-version-file: .nvmrc + package-manager-cache: false + - uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 + if: steps.scope.outputs.deps == 'true' + with: + distribution: temurin + java-version: '25' + - name: Test backend and build frontend + if: steps.scope.outputs.deps == 'true' + run: | + npm --prefix frontend ci + npm --prefix frontend run build + ./mvnw --batch-mode --no-transfer-progress -DfailIfNoTests=true verify diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..3cc0590 --- /dev/null +++ b/renovate.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "timezone": "America/Puerto_Rico", + "schedule": [ + "* 22-23,0-2 * * *" + ], + "automergeSchedule": [ + "* 22-23,0-2 * * *" + ], + "updateNotScheduled": false, + "prConcurrentLimit": 2, + "prHourlyLimit": 1, + "commitHourlyLimit": 2, + "minimumReleaseAge": "3 days", + "platformAutomerge": false, + "automergeType": "pr", + "automergeStrategy": "squash", + "automerge": false, + "ignoreTests": false, + "internalChecksAsSuccess": false, + "vulnerabilityAlerts": { + "enabled": false + }, + "packageRules": [ + { + "description": "Application images are advanced by the existing verified release workflow", + "matchDatasources": [ + "docker" + ], + "matchPackageNames": [ + "ghcr.io/javadevjt/**" + ], + "enabled": false + }, + { + "description": "Automerge tested dependencies through the protected GitHub CI check", + "matchManagers": [ + "maven" + ], + "matchFileNames": [ + "pom.xml" + ], + "matchUpdateTypes": [ + "minor", + "patch" + ], + "automerge": true, + "matchCurrentVersion": "!/^0[.]/" + }, + { + "description": "Automerge tested dependencies through the protected GitHub CI check", + "matchManagers": [ + "npm" + ], + "matchFileNames": [ + "frontend/package.json" + ], + "matchUpdateTypes": [ + "minor", + "patch" + ], + "automerge": true, + "matchCurrentVersion": "!/^0[.]/" + } + ] +}