Skip to content

Commit

Permalink
Merge branch 'main' into ip-reports
Browse files Browse the repository at this point in the history
  • Loading branch information
krrish-sehgal authored Nov 5, 2024
2 parents 4e654b5 + 578d464 commit 45376c4
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/run-djlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run djlint

on:
workflow_dispatch:

permissions:
contents: write

jobs:
run-djlint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install djlint
run: |
python -m venv venv
source venv/bin/activate
pip install djlint
- name: Run djlint
run: |
source venv/bin/activate
files_to_check=$(find company/templates website/templates -type f -name "*.html")
djlint --reformat $files_to_check || true
- name: Commit changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Apply djlint fixes" || echo "No changes to commit"
git push origin ${{ github.head_ref }}

0 comments on commit 45376c4

Please sign in to comment.