diff --git a/.github/workflows/pr_pre-commit.yaml b/.github/workflows/pr_pre-commit.yaml index 6898c92d2..a5436bd9b 100644 --- a/.github/workflows/pr_pre-commit.yaml +++ b/.github/workflows/pr_pre-commit.yaml @@ -13,6 +13,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + fetch-depth: 0 - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: python-version: '3.12' @@ -21,3 +23,5 @@ jobs: toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} components: rustfmt,clippy - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 + with: + extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}" diff --git a/.github/workflows/reviewdog.yaml b/.github/workflows/reviewdog.yaml deleted file mode 100644 index d1dcdec7f..000000000 --- a/.github/workflows/reviewdog.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -name: reviewdog -on: - pull_request - -permissions: - contents: read - checks: write - pull-requests: write - issues: write - -jobs: - actionlint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - - uses: reviewdog/action-actionlint@89a03f6ba8c0a9fd238e82c075ffb34b86e40291 # v1.46.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - detect-secrets: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - - uses: reviewdog/action-detect-secrets@8827bf02944e7d1684d490c2361be0bf6c2d6e7d # v0.21.0 - with: - github_token: ${{ secrets.github_token }} - - markdownlint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - - uses: reviewdog/action-markdownlint@5bc6ad5ba9e1250878f351bafcc7ac0a11dc050f # v0.18.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - shellcheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: reviewdog/action-shellcheck@52f34f737a16c65b8caa8c51ae1b23036afe5685 # v1.23.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - yamllint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - - uses: reviewdog/action-yamllint@8d79c3d034667db2792e328936811ed44953d691 # v1.14.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bb89419ad..fde0dc952 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,9 +1,7 @@ --- -# See https://pre-commit.com for more information -# See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # 4.6.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -12,28 +10,38 @@ repos: - id: detect-private-key - repo: https://github.com/doublify/pre-commit-rust - rev: v1.0 + rev: eeee35a89e69d5772bdee97db1a6a898467b686e # 1.0 hooks: - id: fmt args: ["--all", "--", "--check"] - id: clippy args: ["--all-targets", "--", "-D", "warnings"] - repo: https://github.com/adrienverge/yamllint - rev: v1.26.3 + rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # 1.35.1 hooks: - id: yamllint - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.31.1 + rev: f295829140d25717bc79368d3f966fc1f67a824f # 0.41.0 hooks: - id: markdownlint - repo: https://github.com/koalaman/shellcheck-precommit - rev: v0.10.0 + rev: 2491238703a5d3415bb2b7ff11388bf775372f29 # 0.10.0 hooks: - id: shellcheck args: ["--severity=info"] + - repo: https://github.com/rhysd/actionlint + rev: 62dc61a45fc95efe8c800af7a557ab0b9165d63b # 1.7.1 + hooks: + - id: actionlint + + - repo: https://github.com/hadolint/hadolint + rev: b3555ba9c2bfd9401e79f2f0da68dd1ae38e10c7 # 2.12.0 + hooks: + - id: hadolint + - repo: local hooks: - id: .scripts/verify-crate-versions