diff --git a/.forgejo/actions/prefligit/action.yml b/.forgejo/actions/prefligit/action.yml deleted file mode 100644 index 8cbd4500..00000000 --- a/.forgejo/actions/prefligit/action.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: prefligit -description: | - Runs prefligit, pre-commit reimplemented in Rust. -inputs: - extra_args: - description: options to pass to pre-commit run - required: false - default: '--all-files' - -runs: - using: composite - steps: - - name: Install uv - uses: https://github.com/astral-sh/setup-uv@v6 - with: - enable-cache: true - ignore-nothing-to-cache: true - - name: Install Prefligit - shell: bash - run: | - curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prefligit/releases/download/v0.0.10/prefligit-installer.sh | sh - - uses: actions/cache@v3 - with: - path: ~/.cache/prefligit - key: prefligit-0|${{ hashFiles('.pre-commit-config.yaml') }} - - run: prefligit run --show-diff-on-failure --color=always -v ${{ inputs.extra_args }} - shell: bash diff --git a/.forgejo/workflows/prefligit-checks.yml b/.forgejo/workflows/prefligit-checks.yml deleted file mode 100644 index cc512496..00000000 --- a/.forgejo/workflows/prefligit-checks.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Checks / Prefligit - -on: - push: - pull_request: -permissions: - contents: read - -jobs: - prefligit: - runs-on: ubuntu-latest - env: - FROM_REF: ${{ github.event.pull_request.base.sha || (!github.event.forced && ( github.event.before != '0000000000000000000000000000000000000000' && github.event.before || github.sha )) || format('{0}~', github.sha) }} - TO_REF: ${{ github.sha }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - persist-credentials: false - - uses: ./.forgejo/actions/prefligit - with: - extra_args: --all-files --hook-stage manual diff --git a/.forgejo/workflows/prek-checks.yml b/.forgejo/workflows/prek-checks.yml new file mode 100644 index 00000000..18f573bb --- /dev/null +++ b/.forgejo/workflows/prek-checks.yml @@ -0,0 +1,34 @@ +name: Checks / Prek + +on: + push: + pull_request: + +permissions: + contents: read + +jobs: + fast-checks: + name: Pre-commit & Formatting + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install uv + uses: https://github.com/astral-sh/setup-uv@v6 + with: + enable-cache: true + ignore-nothing-to-cache: true + cache-dependency-glob: '' + + - name: Run prek + run: | + uvx prek run \ + --all-files \ + --hook-stage manual \ + --show-diff-on-failure \ + --color=always \ + -v diff --git a/.forgejo/workflows/renovate.yml b/.forgejo/workflows/renovate.yml index d2891d91..e8522bec 100644 --- a/.forgejo/workflows/renovate.yml +++ b/.forgejo/workflows/renovate.yml @@ -10,21 +10,22 @@ on: dryRun: description: 'Dry run mode' required: false - default: 'false' + default: null type: choice options: - - 'true' - - 'false' + - null + - 'extract' + - 'lookup' + - 'full' logLevel: description: 'Log level' required: false default: 'info' type: choice options: - - 'debug' - 'info' - - 'warn' - - 'error' + - 'warning' + - 'critical' push: branches: @@ -42,23 +43,20 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Run Renovate + - name: Self-hosted Renovate uses: https://github.com/renovatebot/github-action@v40.1.0 - with: - token: ${{ secrets.RENOVATE_TOKEN }} - configurationFile: renovate.json env: - # Platform configuration - Forgejo uses Gitea-compatible API - RENOVATE_PLATFORM: gitea - RENOVATE_ENDPOINT: ${{ github.server_url }}/api/v1 - RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }} - - # Target repository - RENOVATE_REPOSITORIES: '["${{ github.repository }}"]' - - # Runtime behaviour - RENOVATE_DRY_RUN: ${{ inputs.dryRun || 'false' }} LOG_LEVEL: ${{ inputs.logLevel || 'info' }} - - # Git author for commits - configured via repository variables - RENOVATE_GIT_AUTHOR: '${{ vars.RENOVATE_AUTHOR }}' + RENOVATE_AUTODISCOVER: 'false' + RENOVATE_BINARY_SOURCE: 'install' + RENOVATE_DRY_RUN: ${{ inputs.dryRun || 'false' }} + RENOVATE_ENDPOINT: ${{ github.server_url }}/api/v1 + RENOVATE_GIT_TIMEOUT: 60000 + RENOVATE_GIT_URL: 'endpoint' + RENOVATE_GITHUB_TOKEN_WARN: 'false' + RENOVATE_ONBOARDING: 'false' + RENOVATE_PLATFORM: 'forgejo' + RENOVATE_PR_COMMITS_PER_RUN_LIMIT: 3 + RENOVATE_REPOSITORIES: '["${{ github.repository }}"]' + RENOVATE_REQUIRE_CONFIG: 'required' + RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 68e3a982..da594310 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - - id: check-byte-order-marker + - id: fix-byte-order-marker - id: check-case-conflict - id: check-symlinks - id: destroyed-symlinks diff --git a/renovate.json b/renovate.json index 3122d0bc..b48fc6dc 100644 --- a/renovate.json +++ b/renovate.json @@ -58,7 +58,5 @@ "matchUpdateTypes": ["patch"], "groupName": "rust-patch-updates" } - ], - "prConcurrentLimit": 3, - "prHourlyLimit": 2 + ] }