Skip to content

Update actions/checkout action to v4.2.1 #3480

Update actions/checkout action to v4.2.1

Update actions/checkout action to v4.2.1 #3480

Workflow file for this run

---
name: update-readme
on:
pull_request:
types:
- opened
- synchronize
- reopened
- closed
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.1
if: github.event_name != 'pull_request' || github.event.action != 'closed'
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: actions/setup-node@v4.0.4
if: github.event_name != 'pull_request' || github.event.action != 'closed'
with:
cache: npm
- if: github.event_name != 'pull_request' || github.event.action != 'closed'
run: npm ci
- name: Get inputs markdown
id: get_inputs_markdown
if: github.event_name != 'pull_request' || github.event.action != 'closed'
uses: actions/github-script@v7.0.1
env:
HEAD_REF: ${{github.event.pull_request.head.ref || github.head_ref}}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: string
script: |
const script = require('./scripts/update_readme/update_readme/get_inputs_markdown.js')
return script()
- if: github.event_name != 'pull_request' || github.event.action != 'closed'
env:
INPUTS: ${{steps.get_inputs_markdown.outputs.result}}
run: bash "${GITHUB_WORKSPACE}/scripts/update_readme/update_readme/update_readme.sh"
- if: github.event_name != 'pull_request' || github.event.action != 'closed'
run: npx prettier --write .
- uses: dev-hato/actions-diff-pr-management@v1.1.13
with:
github-token: ${{secrets.GITHUB_TOKEN}}
branch-name-prefix: fix-readme
pr-title-prefix: README修正
pr-description-prefix: READMEを修正しました。
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true