GitHub 操作工作流没有被触发

问题描述 投票:0回答:0

我有以下 yml 文件作为我的 GitHub 工作流:

name: Lint and Test Charts

on:
  push:
    branches: [ main/master ]
  pull_request:
    branches: [ main/master ]
    paths:
      - 'open-electrons-monitoring/**'
      - "!**/README.md"
      - "!images/**"
      - "!README.md"

jobs:
  lint-test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Install Helm
        uses: azure/setup-helm@v1

      - uses: actions/setup-python@v2
        with:
          python-version: 3.7

      - name: Install chart-testing
        uses: helm/[email protected]

      - name: Run chart-testing (list-changed)
        id: list-changed
        run: |
          changed=$(ct list-changed)
          if [[ -n "$changed" ]]; then
            echo "::set-output name=changed::true"
          fi

      - name: Run chart-testing (lint)
        run: ct lint

      - name: Create kind cluster
        uses: helm/[email protected]
        if: steps.list-changed.outputs.changed == 'true'

      - name: Run chart-testing (install)
        run: ct install

这个文件在 .github/workflows 中定义,可以看出我想在任何推送到 master 分支时运行它。但是奇怪的是好像没有被触发。我还检查了我的默认分支 master,所以我看不出有任何理由不触发它?

github-actions kubernetes-helm
© www.soinside.com 2019 - 2024. All rights reserved.