Skip to content

Lock file maintenance #1072

Lock file maintenance

Lock file maintenance #1072

Workflow file for this run

---
name: format
on:
pull_request:
types:
- opened
- synchronize
- reopened
- closed
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
if: github.event_name != 'pull_request' || github.event.action != 'closed'
with:
cache: npm
node-version-file: .node-version
- if: github.event_name != 'pull_request' || github.event.action != 'closed'
run: npm install
- name: Get inputs markdown
id: get_inputs_markdown
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
if: github.event_name != 'pull_request' || github.event.action != 'closed'
env:
HEAD_REF: ${{github.event.pull_request.head.ref || github.head_ref}}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: string
script: |
const {tsImport} = require('tsx/esm/api')
const {default: {script}} = await tsImport(
'./scripts/format/format/get_inputs_markdown.ts',
process.env.GITHUB_WORKSPACE + '/'
)
return script()
- env:
INPUTS: ${{steps.get_inputs_markdown.outputs.result}}
if: github.event_name != 'pull_request' || github.event.action != 'closed'
run: bash "${GITHUB_WORKSPACE}/scripts/format/format/update_readme.sh"
- run: npx prettier --write .
if: github.event_name != 'pull_request' || github.event.action != 'closed'
- run: tsc
if: github.event_name != 'pull_request' || github.event.action != 'closed'
- uses: ./
with:
github-token: ${{secrets.GITHUB_TOKEN}}
branch-name-prefix: fix-format
pr-title-prefix: format修正
pr-description-prefix: formatを修正しました。
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true