Skip to content

Commit

Permalink
update checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
wanglusheng committed Feb 6, 2025
1 parent 750b111 commit 4572f24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/auto_format_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ jobs:

steps:
- name: Checkout code
- if: github.event_name == 'push'
uses: actions/checkout@v2
- if: github.event_name == 'pull_request'
uses: actions/checkout@v2
- if: github.event_name == 'push'
uses: actions/checkout@v4
- if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Run Black
uses: actionsx/prettier@v2
with:
# prettier CLI arguments.
args: --write "**/*.yml" "**/*.md"

- name: Commit changes
id: commit_changes
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: format & update for python
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/auto_format_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- name: Checkout code
- if: github.event_name == 'push'
uses: actions/checkout@v2
- if: github.event_name == 'pull_request'
uses: actions/checkout@v2
- if: github.event_name == 'push'
uses: actions/checkout@v4
- if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

Expand All @@ -30,6 +30,7 @@ jobs:
id: commit_changes
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: format & update for python
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
Expand Down

0 comments on commit 4572f24

Please sign in to comment.