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:
But it doesn’t work for the other branches:
-
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 theroza/API_submodulofiles
branch. Specifically, ensure there are no settings underSettings
->Actions
->General
that limit workflow execution to specific branches.
- Navigat to the
-
Confirm Changes are Properly Pushed:
- Ensu that the
pipeline.yml
file is indeed present on theroza/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.
- Ensu that the
-
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 theroza/API_submodulofiles
branch.
- 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
-
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.
-
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.
-
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 underSettings
->Branches
in GitHub.
- Verif if there are any branch protection settings that might be preventing actions from running on the
2
Answers
The error was apparently here:
When I took the:
It worked for the other branches, now it looks like this:
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.