Skip to content

Github Actions 手动触发 workflow #79

@techiall

Description

@techiall

添加一个参数 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 文档

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions