github actions使用笔记

第一步:
在这里插入图片描述
第二步:
在这里插入图片描述
第三步:
左边红色框中的是你新建actions脚本的路径和名字,根目录就是你的项目根目录
点击右边的start commit 按钮完成创建
在这里插入图片描述
第四步:
点击commit new file按钮 完成创建 你就可以在你的项目中看到main.yml这个配置文件了
在这里插入图片描述
第五步:
重点1:- uses: actions/checkout@v2 这个是必须要使用的,拷贝你的代码
这样做了以后,那么脚本你可以自行决定 shell js皆可

name: CI

# Controls when the action will run. 
on:
  # Triggers the workflow on push or pull request events but only for the main branch
  push:
    branches: [ main ]
  # pull_request:
  #   branches: [ main ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: windows-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v2

      # Runs a single command using the runners shell
      - name: Run a one-line script
        run: echo Hello, world!

      # Runs a set of commands using the runners shell
      - name: Run a multi-line script
        shell: bash
        run: |
          sh pulish001.sh

脚本路径
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值