This repository has been archived by the owner on Jul 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.65 KB
/
autoformat.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: "Auto Format"
on:
workflow_dispatch:
schedule:
# 開発の動きがない時間を想定し、毎日午前 6 時に実施
- cron: '0 21 * * *'
jobs:
format:
runs-on: ubuntu-22.04
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/[email protected]
- name: Create GitHub App Token
uses: actions/[email protected]
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version-file: 'package.json'
- name: Setup pnpm
uses: pnpm/[email protected]
- name: Clean install using pnpm
shell: bash
run: pnpm install --no-frozen-lockfile
- name: Run prettier
shell: bash
run: pnpm run format
- name: Create pull request
uses: peter-evans/[email protected]
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: ':recycle: Auto format'
committer: GitHub <[email protected]>
author: albelium-bot[bot] <154823176+albelium-bot[bot]@users.noreply.github.com>
signoff: false
title: ':recycle: Auto Format'
body: 'This was automatically generated by the [${{ github.workflow }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})'
labels: |
ignore-for-release
base: 'main'
branch: 'workflow/auto-format'
branch-suffix: 'short-commit-hash'