techiall / Blog

🍋 [My Blog] See discussions
https://github.com/techiall/Blog/discussions
MIT License
8 stars 1 forks source link

Github Actions 手动触发 workflow #79

Closed techiall closed 2 years ago

techiall commented 3 years ago

添加一个参数 workflow_dispatch,这样子就可以指定某条分支进行构建了

例子如下:

name: Build

on:
  workflow_dispatch:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

这样子就可以在 Actions 中看到选项了

image

更多配置可以查看 Github 文档