Skip to content

Commit d712e53

Browse files
committed
Updated workflow
1 parent 256f7fa commit d712e53

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/black.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,23 @@ jobs:
3838
run: |
3939
git config user.name "github-actions[bot]"
4040
git config user.email "github-actions[bot]@users.noreply.github.com"
41+
42+
# Ensure you are on the correct branch
43+
git checkout -B $GITHUB_HEAD_REF || git checkout -b new-branch-name
44+
45+
# Stage and commit changes
4146
git add .
4247
if git diff --cached --quiet; then
4348
echo "No formatting changes to commit."
4449
exit 0
4550
fi
4651
git commit -m "Auto-format code with Black and isort"
52+
53+
# Push changes
4754
git push origin $GITHUB_HEAD_REF
4855
4956
57+
5058
validate-version:
5159
name: Validate Version
5260
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)