Skip to content

Commit

Permalink
Fix compliance conflicts and show them on the body
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsiqueira committed Sep 22, 2023
1 parent 59cb8f8 commit 90a5ab1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/Compliance.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,33 @@ jobs:
- uses: julia-actions/setup-julia@v1
with:
version: "1"
- name: Use Julia cache
uses: julia-actions/cache@v1
- name: Install JuliaFormatter.jl
run: julia -e 'using Pkg; pkg"add JuliaFormatter"'
- name: Setup Python
uses: actions/setup-python@v4
- name: Check for update in the template
run: |
pip install copier pre-commit
copier update -A
pre-commit run -a
pip install copier
copier update -A -o rej
echo -e "Automated changed by Compliance.yml workflow\n" > /tmp/body.md
echo -e 'Rejected changes (if any):\n```diff\n' >> /tmp/body.md
find . -name "*.rej" | xargs cat >> /tmp/body.md
echo -e '```' >> /tmp/body.md
git diff
- name: Run pre-commit to run the formatters
run: |
pip install pre-commit
pre-commit run -a || true # Ignore pre-commit errors
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.COMPLIANCE_PAT }}
commit-message: ":robot: COPIERTemplate.jl update"
title: "[AUTO] COPIERTemplate.jl update"
body-path: /tmp/body.md
branch: auto-copier-template-update
delete-branch: true
labels: configuration, automated pr, no changelog
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.jl.mem
Manifest.toml
docs/build/
*.rej

0 comments on commit 90a5ab1

Please sign in to comment.