skip to Main Content

I have a branch called ci-checks, I started doing the ci-cd in this branch and for now everything is working normally, when I created another branch to create new features and deal with bugs. When I went to push it on github it was no longer applying the ci cd and nothing appeared in the actions! My question, how to adjust github to use ci cd in all branches?

name: Pipeline Django

on:
  push:
    branches:
      - '*'
  pull_request:
    branches:
      - '*'

jobs:
  build:
    runs-on: ubuntu-latest

In the image below it already shows that it is working for the ci-cheks branch:

enter image description here

But it doesn’t work for the other branches:

enter image description here

  1. Check GitHub Execution Limitations:

    • Navigat to the Actions section in GitHub to verify if there are any execution restrictions that could be preventing the workflows from running on the roza/API_submodulofiles branch. Specifically, ensure there are no settings under Settings -> Actions -> General that limit workflow execution to specific branches.
  2. Confirm Changes are Properly Pushed:

    • Ensu that the pipeline.yml file is indeed present on the roza/API_submodulofiles branch by checking directly on GitHub in the repository interface. If the file is missing, you will need to push it to the branch.
  3. Make a Test Commit:

    • Sometims, making a new commit can help reset any state that may be preventing the workflows from triggering. Make a minor change to the code or comments in the pipeline.yml file and push this change to the roza/API_submodulofiles branch.
  4. Check Execution Logs:

    • After pushing a new commit, check the logs in GitHub Actions to see if the workflow was triggered and to diagnose any errors that may have occurred during execution.
  5. Clear Cache and Stored Data:

    • In exteme cases, it may be useful to clear any cache or stored data that might be affecting the CI/CD processes. This can be done through the configuration of actions or by specific commands in your CI scripts.
  6. Check Branch Protection Settings:

    • Verif if there are any branch protection settings that might be preventing actions from running on the roza/API_submodulofiles branch. This can be checked under Settings -> Branches in GitHub.

2

Answers


  1. Chosen as BEST ANSWER

    The error was apparently here:

    name: Pipeline Django
    
    on:
      push:
        branches:
          - '*'
      pull_request:
        branches:
          - '*'
    
    jobs:
      build:
        runs-on: ubuntu-latest
    
    

    When I took the:

    branches:
          - '*'
    

    It worked for the other branches, now it looks like this:

    name: Pipeline Django ci
    
    on:
      push:
      pull_request:
        branches:
          - '*'
    

  2. The workflow MUST exist on the repository default branch to appear on the Action tab, making it possible to choose the desirable branch to execute.

    Check your default branch in Settings > Branches > Default branch, and change it accordingly.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search