# GitHub Actions integration You can use _Black_ within a GitHub Actions workflow without setting your own Python environment. Great for enforcing that your code matches the _Black_ code style. ## Usage Create a file named `.github/workflows/black.yml` inside your repository with: ```yaml name: Lint on: [push, pull_request] jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - uses: psf/black@stable ``` We recommend the use of the `@stable` tag, but per version tags also exist if you prefer that. You may use `options` (Default is `'--check --diff'`) and `src` (Default is `'.'`) as follows: ```yaml - uses: psf/black@stable with: options: "--check --verbose" src: "./src" ```