create blog for issue #63 #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Issue to Hexo | |
run-name: 'create blog for issue #${{ github.event.inputs.issue_number }}' | |
on: | |
workflow_dispatch: | |
inputs: | |
issue_number: | |
description: issues number which use commas to separate | |
required: true | |
type: string | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: init pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: init node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
cache-dependency-path: | | |
src/pnpm-lock.yaml | |
.github/actions/issue-to-hexo/pnpm-lock.yaml | |
- name: install dependencies | |
working-directory: src | |
run: pnpm install | |
- name: install dependencies | |
working-directory: .github/actions/issue-to-hexo | |
run: pnpm install | |
- name: issue to hexo | |
uses: ./.github/actions/issue-to-hexo | |
with: | |
issue_number: ${{ github.event.inputs.issue_number }} | |
- name: hexo build | |
run: pnpm run build | |
- name: create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
delete-branch: true | |
title: 'New blog for issue #${{ github.event.inputs.issue_number }}' | |
base: master | |
branch: feat/new-blog-by-action |