Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 29 additions & 4 deletions .github/workflows/update-prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ name: Update Prettier
branches:
- renovate/prettier-*

permissions:
contents: read

jobs:
update_prettier:
if: github.repository_owner == 'octokit'
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
cache: npm
- run: npm ci
- run: npm run lint:fix
Expand All @@ -26,3 +27,27 @@ jobs:
body: An update to prettier required updates to your code.
branch: ${{ github.ref }}
commit-message: "style: prettier"

update_prettier_fork:
if: github.repository_owner != 'octokit'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run lint:fix
- uses: gr2m/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
title: Prettier updated
body: An update to prettier required updates to your code.
branch: ${{ github.ref }}
commit-message: "style: prettier"