我正在尝试自动向GitHub PRs应用标签。
我遇到了一个很棒的GitHub行动,我无法理解在哪里放置标签和any[]或all[]
到目前为止我已经试过了-
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler
name: Labeler
on: [pull_request]
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
- name: Applying labels.
deployment:
- any: ['deployment/backend-stack/deployment.yaml']发布于 2022-03-05 17:11:50
您可以在此承诺中找到一些愿望,基本上标签配置在.github/labeler.yml中。
发布于 2022-10-07 09:10:48
正如在正式文件中所描述的,您需要在.github/文件夹中有两个文件:
.github/workflows/labeler.yml定义的.github/labeler.yml关键词any和all的区别
示例
..github/workflow/labeler.yml
name: Labeler
on: [pull_request]
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true. .github/labeler.yml
deployment:
- any: ['deployment/backend-stack/deployment.yaml']https://stackoverflow.com/questions/71362028
复制相似问题