Merge pull request #18 from d-kimuson/feature/pinact

ci: improve workflow configuration with Pinact integration
This commit is contained in:
きむそん
2025-10-18 14:33:23 +09:00
committed by GitHub
22 changed files with 53 additions and 21 deletions

23
.github/actions/setup-git/action.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: "Setup Git"
description: "Setup git config for commit and push on actions"
inputs:
github_token:
description: "The GitHub token to use"
required: true
origin:
description: "The origin to use"
required: true
runs:
using: "composite"
steps:
- name: Set up Git
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
shell: bash
run: |
git config --local user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
git config --local user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --local url."https://oauth2:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
git pull --rebase origin ${{ inputs.origin }}

View File

@@ -4,12 +4,12 @@ runs:
using: "composite"
steps:
- name: Install pnpm
uses: pnpm/action-setup@v4.0.0
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 10.8.1
- name: Setup Node.js 20.12.0
uses: actions/setup-node@v4.0.0
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: 20.12.0
cache: pnpm

View File

@@ -13,13 +13,13 @@ concurrency:
jobs:
check:
name: Quality Checks
name: check
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v5.0.0
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Node & pnpm
uses: ./.github/actions/setup-node

View File

@@ -1,21 +1,31 @@
name: Run Pinact
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
pinact:
name: pinact
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Pin actions
uses: suzuki-shunsuke/pinact-action@d735505f3decf76fca3fdbb4c952e5b3eba0ffdd # v0.1.2
with:
app_id: ${{secrets.APP_ID}}
app_private_key: ${{secrets.APP_PRIVATE_KEY}}
app_id: ${{ vars.BOT_APP_ID }}
app_private_key: ${{ secrets.BOT_APP_PRIVATE_KEY }}

View File

@@ -18,7 +18,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v5.0.0
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Node & pnpm
uses: ./.github/actions/setup-node
@@ -30,7 +30,7 @@ jobs:
run: pnpm up --latest --no-frozen-lockfile
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7.0.0
uses: peter-evans/create-pull-request@4320041ed380b20e97d388d56a7fb4f9b8c20e79 # v7.0.0
with:
commit-message: 'chore(deps): update all dependencies'
title: 'chore(deps): update all dependencies'

View File

@@ -21,7 +21,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v5.0.0
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
persist-credentials: false
@@ -35,14 +35,10 @@ jobs:
pnpm exec playwright install
- name: Set up Git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
git config --local user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --local url."https://oauth2:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
git pull --rebase origin ${{ github.head_ref }}
uses: ./.github/actions/setup-git
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
origin: ${{ github.head_ref }}
- name: Build project
run: pnpm build

3
.gitignore vendored
View File

@@ -46,3 +46,6 @@ dist/*
# playwright
.user-data/
# claude code
.claude/settings.local.json