toradex / vscode-torizon-templates

VS Code Torizon Integrated Development Environment Templates
MIT License
14 stars 20 forks source link

GH Actions CI/CD excluded from Git when created from template #179

Closed leograba closed 4 days ago

leograba commented 5 months ago

I created a Qt 6 QML C++ project from template.

When following the article CI/CD - Integrate With GitHub Actions, I was not able to trigger a GH Actions pipeline when pushing to the main branch.

I noticed the .gitignore file was excluding the .github/workflows/build-application.yaml file:

$ git add .github/workflows/build-application.yaml 
The following paths are ignored by one of your .gitignore files:
.github/workflows/build-application.yaml
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"

Then confirmed it was the case patching the .gitignore:

diff --git a/.gitignore b/.gitignore
index c70dc10..fc6d1c6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@ credentials.zip
 *.lock.yml

 build-*
+!.github/workflows/build-*

 # After committing it once, to stop having modifications every time you do 
 # anything on Qt Creator (like dragging the window, literally almost anything),

After this, I added the missing file, pushed and got a CI triggered.

microhobby commented 4 days ago

thanks for the report and fix suggestion @leograba