Skip to content

NodeJS 模块系统备忘:CommonJS & ESM #37

NodeJS 模块系统备忘:CommonJS & ESM

NodeJS 模块系统备忘:CommonJS & ESM #37

Workflow file for this run

name: ISSUE
on:
issues:
types: [opened, edited, deleted, labeled, unlabeled]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js 16
uses: actions/setup-node@v2-beta
with:
node-version: '16'
- name: Install Deps
run: npm install @actions/github
- name: Commit files
if: github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'labeled' || github.event.action == 'unlabeled'
run: |
node ./script/update-issue.js
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add ./content
git commit -a -m "update content/posts/${{ github.event.issue.number }}.md"
- name: Commit files
if: github.event.action == 'deleted'
run: |
node ./script/update-issue.js
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git rm ./content/posts/${{ github.event.issue.number }}.md
git commit -a -m "remove content/posts/${{ github.event.issue.number }}.md"
- name: Push changes
run: git push