Skip to content

update name to specify action name #1

update name to specify action name

update name to specify action name #1

Workflow file for this run

name: Pep8
on:
push:
branches:
- 127-pep8
pull_request:
branches:
- 127-pep8
# Test(jiwon)
jobs:
autopep8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: autopep8
uses: peter-evans/autopep8@v2
with:
args: --recursive --in-place --aggressive --aggressive .
- name: Check for changes
id: check-changes
run: git diff --exit-code
continue-on-error: true
- name: Commit and push changes
# a failue of this step means changes were detected
if: steps.check-changes.outcome != 'success'
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git commit -am "Auto-format code using Clang-Format" || echo "No changes to commit"
- name: Push changes to main-autopep8 branch
if: steps.check-changes.outcome != 'success'
run: git push origin 127-pep8:main-autopep8
# TODO(test) jiwon
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Auto-format code using autopep8"
title: "Auto-format code by autopep8"
body: "This is an auto-generated PR with fixes by autopep8."
branch: main-autopep8