diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index d57929b..44b6384 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -8,3 +8,5 @@ updates: actions: patterns: - "*" + cooldown: + default-days: 7 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e2cce5c..f448021 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,3 +1,5 @@ +name: CI + on: pull_request: push: @@ -7,7 +9,7 @@ permissions: contents: read jobs: - main-uvx: + self-test-uvx: runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 @@ -15,7 +17,7 @@ jobs: persist-credentials: false - name: self test action (uvx path) uses: ./ - main-uv-run: + self-test-uv-run: runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 @@ -25,7 +27,7 @@ jobs: shell: bash - name: self test action (uv run path) uses: ./ - main-external-uv: + self-test-external-uv: runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 79ce316..9b7f5e8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,10 @@ repos: -- repo: https://github.com/pre-commit/pre-commit-hooks + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml - repo: https://github.com/zizmorcore/zizmor-pre-commit rev: v1.23.1 hooks: diff --git a/action.yml b/action.yml index 55b75e0..38a31cb 100644 --- a/action.yml +++ b/action.yml @@ -19,20 +19,22 @@ runs: shell: bash - name: Install the latest version of uv if: inputs.uv-install == 'true' || (inputs.uv-install == 'auto' && steps.check-uv.outputs.installed != 'true') - uses: astral-sh/setup-uv@v7 + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 with: enable-cache: true cache-dependency-glob: '.pre-commit-config.yaml' - run: uv run --isolated --no-sync true && echo "pythonLocation=$(uv python find)" >>$GITHUB_ENV shell: bash - - uses: actions/cache@v5 + - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 with: path: ~/.cache/pre-commit key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} - run: | if [ -f pyproject.toml ]; then - uv run --no-sync --with pre-commit-uv pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }} + uv run --no-sync --with pre-commit-uv pre-commit run --show-diff-on-failure --color=always ${INPUTS_EXTRA_ARGS} else - uvx --with pre-commit-uv pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }} + uvx --with pre-commit-uv pre-commit run --show-diff-on-failure --color=always ${INPUTS_EXTRA_ARGS} fi shell: bash + env: + INPUTS_EXTRA_ARGS: ${{ inputs.extra_args }}