Commit Graph

10 Commits

Author SHA1 Message Date
Kevin Stillhammer d8281c74d4 Do not expect GITHUB_TOKEN to be set or valid (#65)
Fixes: #49
Fixes: #63

This enables use of this action with GHES
2025-01-29 20:24:35 +01:00
Kevin Stillhammer 2993ff4a65 Fix compiled known versions (#62) 2025-01-28 20:54:37 +01:00
github-actions[bot] 20a3b171f4 chore: update known checksums for 0.9.3 (#61)
chore: update known checksums for 0.9.3

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2025-01-28 20:14:31 +01:00
Kevin Stillhammer 9071a7b1c3 Use TOML 1.0.0 compliant library for parsing (#47)
iarna/toml is unmaintained.
Replaced by smol-toml which is maintained and has the same api
2025-01-16 17:20:40 +01:00
github-actions[bot] 0c24450c01 chore: update known checksums for 0.9.1 (#42)
chore: update known checksums for 0.9.1

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2025-01-11 13:39:34 +01:00
Kevin Stillhammer 31a5185046 Replace toml parsing library (#32)
"toml" does not support all TOML features
https://github.com/BinaryMuse/toml-node/issues/51

Fixes: #31
2024-12-23 19:07:34 +01:00
Kevin Stillhammer 7a82f1f7e4 Default to ruff-version from pyproject.toml (#30)
Closes: #9 

Changes the default behavior to:

- Search for a pyproject.toml in the repo root
- Search in project.dependencies and dependency-groups.dev for ruff
- If none is found use latest

Support for requirements.txt files can be added later
2024-12-23 11:07:46 +01:00
Kevin Stillhammer 35619fdbcc Add problem matchers (#26)
Closes: #12
2024-12-08 12:17:50 +01:00
Kevin Stillhammer a2d5d1ffa4 Set output format to github (#24)
This was accidentally removed in the v2 release
2024-12-08 11:36:31 +01:00
Kevin Stillhammer f2e3221107 Convert from composite to typescript (#17)
# Summary

Converts the action from a [composite to
javascript](https://docs.github.com/en/actions/sharing-automations/creating-actions/about-custom-actions#types-of-actions).
Most importantly to make use of prebuilt libraries and helpers like
[actions/toolkit](https://github.com/actions/toolkit).

The structure and features are modeled after
[astral-sh/setup-uv](https://github.com/astral-sh/setup-uv)

## Changes

1. Download the ruff executable for the current platform from the GitHub
releases
2. Add ruff to the PATH
3. Validate the downloaded ruff executable against its checksum
4. Cache ruff in the [Tool
Cache](https://github.com/actions/toolkit/tree/main/packages/tool-cache)
to speed up runs on self-hosted runners
5. Support semver ranges to define the ruff version to install

## 🚨 Breaking changes

Removes the `changed-files` input.

This input could previously be used to run ruff only on files changed in
a PR. The functionality was implemented by calling another action. This
repo should focus on providing a quick and easy way to use ruff in
GitHub Actions, not add more functionality on top of ruff.

The previous functionality can be replicated with:

```yaml
- uses: actions/checkout@v4
- name: Get changed files
  id: changed-files
  uses: tj-actions/changed-files@v45
  with:
    files: |
      **.py
- name: Run ruff on changed files only 
  uses: astral-sh/ruff-action@v2
  with:
    src: ${{ steps.changed-files.outputs.all_changed_files }}
```

This was tested here:
https://github.com/astral-sh/ruff-action/actions/runs/12017035736/job/33498508269
2024-12-03 17:18:31 +01:00