Skip to content

Commit 3c5d811

Browse files
authored
Merge pull request #61 from reactome/60-auto-formatting-pipeline
fix: Autofix pipeline
2 parents 0f48e59 + 244cb4d commit 3c5d811

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/prettier.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: autofix.ci
22
on:
33
pull_request:
4-
push:
54

65
permissions:
76
contents: write
@@ -30,6 +29,17 @@ jobs:
3029
echo "No files to format"
3130
fi
3231
33-
- uses: autofix-ci/action@v1
34-
with:
35-
commit-message: "Apply Prettier format"
32+
- name: Commit formatted changes
33+
run: |
34+
git config user.name "github-actions[bot]"
35+
git config user.email "github-actions[bot]@users.noreply.github.com"
36+
37+
if [ -n "$(git status --porcelain)" ]; then
38+
# Check out the PR branch to avoid detached HEAD
39+
git checkout ${{ github.head_ref }}
40+
git add --all
41+
git commit -m "chore: Apply Prettier formatting"
42+
git push origin ${{ github.head_ref }}
43+
else
44+
echo "No formatting changes to commit"
45+
fi

0 commit comments

Comments
 (0)