Skip to content

zhelingwang is learning GitHub Actions #2

zhelingwang is learning GitHub Actions

zhelingwang is learning GitHub Actions #2

Workflow file for this run

name: test
run-name: ${{ github.actor }} is learning GitHub Actions
# events 定义触发事件以及条件
on:
push:
branches:
- main
paths:
- '.github/workflows/**'
- '__test__/**'
- 'src/**'
# tags:
# - v1.**
jobs:
# 第一个任务
test:
# 虚拟机的系统
runs-on: ubuntu-latest
steps:
# 一个 - 就是一个step
# 第三方action: git pull repo code on virtual runner server
- uses: actions/checkout@v2
# 第三方action: 安装nodejs
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 20
- name: lint
# 多行写法 | 开头
run: |
npm i
npm run lint