Stack Exchange
GitHub Actions Workflow not getting Triggered
I have the following yml file as my GitHub workflow:
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/chart-testing-action@v2.0.1

      - 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/kind-action@v1.0.0
        if: steps.list-changed.outputs.changed == 'true'

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

This file is defined inside .github/workflows and as it can be seen that I want to run it upon any push to the master branch. But strangely it seems not to be triggered. I also checked my default branch which is master, so I do not see any reason as to why this should not get triggered?


Your branch specification is incorrect. main/master means "a branch called main/master, and that doesn't seem to exist on your repo. What you probably want is an array:
on:
  push:
    branches:
      - main
      - master
  pull_request:
    branches:
      - main
      - master
...


Nope, even with this change the workflow is not triggered: https://github.com/open-electrons/open-electrons-deployments/actions

@joesan That last push didn't affect any files not excluded by your paths — if you change something in open-electrons-monitoring/** or include .github/** does that work?

Spot on! I kind of missed that! Thanks!

If your branch is called main/master it's correct, instead if your branch is just master or main I think you need to change the ON condition like following
name: Lint and Test Charts

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


Edit value of key branches to
on:
  push:
    branches:
     - main
     - master
  pull_request:
    branches:
     - main
     - master
    paths:
      - 'open-electrons-monitoring/**'
      - "!**/README.md"
      - "!images/**"
      - "!README.md"

