Skip to content

Commit 55cb5d1

Browse files
committed
ciで自動生成
1 parent ca80ab5 commit 55cb5d1

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Generate Question Examples
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
question-example:
9+
runs-on: ubuntu-latest
10+
# Push権限を付与
11+
permissions:
12+
contents: write
13+
14+
steps:
15+
- uses: actions/checkout@v6
16+
with:
17+
ref: ${{ github.head_ref }}
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
cache: 'npm'
22+
- run: npm ci
23+
24+
- run: npx tsx ./scripts/questionExample.ts 4
25+
env:
26+
API_KEY: ${{ secrets.API_KEY }}
27+
28+
- name: Commit and Push changes
29+
# 前のステップが成功・失敗どちらでも必ず実行
30+
if: always()
31+
run: |
32+
git config user.name "github-actions[bot]"
33+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
34+
git add .
35+
git diff --staged --exit-code || (git commit -m "[ci] generate question examples" && git push)

0 commit comments

Comments
 (0)