gpt4 book ai didi

Github Actions - 当分支中的特定目录获得更新时,您如何触发推送?

转载 作者:行者123 更新时间:2023-12-03 18:32:07 25 4
gpt4 key购买 nike

我希望我的工作流仅在对特定目录进行更改时触发推送。这可能吗,我错过了什么?我尝试做类似您在下面看到的操作,但没有触发。

name: ABC

on:
push:
branches: [master/my-directory]
pull_request:
branches: [ master ]

最佳答案

push 有一个名为 paths 的属性:

name: ABC
on:
push:
branches:
- master
paths:
- my-directory/**
这只会在推送到 master 分支时触发 my-directory 目录树中的更改。有关所有可能的过滤器模式,请参阅 filter pattern cheat sheet

关于Github Actions - 当分支中的特定目录获得更新时,您如何触发推送?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63460875/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com