Skip to content

Commit

Permalink
Update checkout action and push command to use dynamic branch references
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit3523 committed Nov 13, 2024
1 parent 25d5b2d commit 5013ac6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref || github.ref_name }}
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v2
Expand Down Expand Up @@ -46,4 +49,4 @@ jobs:
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add .
git commit -m "chore: format code with Prettier"
git push
git push origin HEAD:${{ github.head_ref || github.ref_name }}

0 comments on commit 5013ac6

Please sign in to comment.