layout: postread_time: trueshow_date: truetitle: ‘github action’date: 2021-07-19img: posts/20210705/4.jpgtags: [cli]category: opinionauthor: 随步description: ‘github action’—
name: //语义化的名字on: // 触发条件 push: branches: [ master ] // 分支 paths: ['src/**'] // 这些文件修改才触发 pull_request: branches: [ master ]jobs: test: runs-on: ubuntu-latest // 在ubuntu 操作系统上跑 steps: // 写几个-,就有几个步骤 - uses: actions/checkout@v2 // 用第三方的actions,git pull 的意思 - name: Use Nodejs uses: actions/setup-node@v1 // 安装nodejs with: node-version: 14 - name: print node version run: | node -v && npm -v && echo 'hi github actions' test2: runs-on: ubuntu-latest steps: - run: touch a.txt - run: echo '输入文本到 a.txt' > a.txt - run: cat a.txt 
Comments