Skip to content

Commit 1fc0f98

Browse files
committed
actions: Let autofix do fixing when pushing
1 parent 1432f06 commit 1fc0f98

File tree

2 files changed

+3
-28
lines changed

2 files changed

+3
-28
lines changed

.github/workflows/autofix.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: autofix.ci # needed to securely identify the workflow
33
on:
44
pull_request:
55
push:
6-
branches: [ "master" ]
6+
branches:
7+
- "*"
78
permissions:
89
contents: read
910

.github/workflows/build.yaml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -46,40 +46,14 @@ jobs:
4646
globs: |
4747
docs/**/*.md
4848
README.md
49-
- name: Stop and report errors if not master
50-
if: github.ref != 'refs/heads/master'
49+
- name: Stop and report errors
5150
run: |
5251
git add -A
5352
if ! git diff-index --quiet --cached HEAD --; then
5453
echo "Stop."
5554
exit 1
5655
fi
5756
58-
- name: Determine if a PR should be submitted
59-
if: github.ref == 'refs/heads/master'
60-
id: file_changes
61-
run: |
62-
git add -A
63-
if git diff-index --quiet --cached HEAD --; then
64-
echo "should_submit=false" >> "$GITHUB_OUTPUT"
65-
else
66-
echo "should_submit=true" >> "$GITHUB_OUTPUT"
67-
fi
68-
69-
- name: Submit PR from linting
70-
if: steps.file_changes.outputs.should_submit == 'true' && github.ref == 'refs/heads/master'
71-
uses: peter-evans/create-pull-request@v6
72-
with:
73-
commit-message: "Auto fix formatting from GitHub Actions run ${{ github.run_number }}"
74-
assignees: "${{ github.actor }}"
75-
branch: auto-fix-actions-${{ github.run_number }}
76-
delete-branch: true
77-
title: "Fix formatting from GitHub Actions run ${{ github.run_number }}"
78-
body: |
79-
Attempt to automatically fix formatting issues in ${{ github.sha }}.
80-
81-
This PR is generated by GitHub Actions [run ${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}). Please choose **Squash and Merge** for this PR.
82-
8357
- name: Build docs
8458
run: |
8559
mkdocs -v build

0 commit comments

Comments
 (0)