I have a project where I use GitHub Actions. I now need to ignore certain file changes inside certain folders. Here is my project structure:
masterDir
- contentDir
- dir1
- file1.ignore.md
- file2.md
- dir2
- file3.md
- file4.ignore.md
So I would like that my GitHub actions are not triggered for any changes to any file that has ignore.md in its file name. So here is what I came up with, but that does not seem to work.
on:
push:
paths-ignore:
- 'README.md'
- 'backup/**'
- 'masterDir/contentDir/**/*.draft.md'
Any ideas on what is wrong with my wildcard match?
It was indeed quite simple to do. All I have to do is the following:
on:
push:
paths-ignore:
- 'README.md'
- 'backup/**'
- '**/*.draft.md'
As a reference, here is the documentation in detail: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#patterns-to-match-file-paths
As it can be seen from the documentation that the wildcard matches any file in any folder that contains a .draft.md match.
Related
I'm using this on: syntax to trigger a workflow when a file in a folder changes or a specific file changes. But for some reason, this is triggering also on any tag even though I tell it to a normal tags.
on:
push:
paths:
- '.cicd/**'
- '.github/workflows/cicd-sync.yaml'
- 'cicd.yaml'
After many attempts at this, I have found the solution to my issue.
Here is how we got it to work
push:
paths:
- '.cicd/**'
- '.github/workflows/cicd-sync.yaml'
- 'cicd.yaml'
branches:
- "**"
ignore-tags:
- '**'
Does anyone know what this does ?
uses: ./
I see it used in quite a few places but cannot seem to find any reference for it.
The uses keyword of github actions is used to specify the action that should be executed as part of a workflow. The ./ value tells GitHub to use the action defined in the current repository, rather than referencing a pre-built action.
It's also possible to specify the path to the action within the repository, rather than using ./. For example:
steps:
- uses: ./path
with:
parameter1: value1
parameter2: value2
This would execute the action located at ./path within the repository.
We ‘d like to introduce Meson to build our existing C++ application. Our structure is as follows:
Wie have 8 main modules (mod_X)
Every module has 20-40 subdirs, each with 5 – 100 cpp files; separated in libs and executables.
mod_INFRA/apps/myparser has a target that creates a code generator executable
Which depends only on mod_INFRA/libs/A
The code generator must be applied to certain files (*.rules) in numerous subdirs in all modules and subdirs, including mod_INFRA itself.
The generated source code must be compiled and considered with the target in subdir_X
What I’d like to achieve:
In root/meson.builddefine a common and re-usable custom_target or generator that I can invoke/apply in every module and subdir as needed.
Problem:
In root/meson.build, we define common variables such as compiler flags etc., and we do subdir(‘mod_INFRA’) for each module. In mod_INFRA/meson.build I do subdir(‘apps/xyz’), subdir(‘libs/abc’), etc. for each subdir. That’s all fine
However I struggle to define the custom_target or generator in root/meson.build. The required executable is not yet available before subdir('mod_INFRA'). And after subdir(..) it is too late, as I need the generator already to build files in other subdirs in mod_INFRA.
A possible solution could be a “proxy” that lazily resolves the executable by target name. E.g. if I could do (pseudo code): generator(getTargetOutput(‘myparser’), …). But I could not find out if that is available.
Any other thoughts on how to resolve it, without completely restructuring the directory structure?
- meson.build
- mod_INFRA
- meson.build
- apps
- meson.build
- myparser
- meson.build
- libs
- subdir_INFRA_A (required to build myparser)
- meson.build
- subdir_INFRA_B
- meson.build
- subdir_INFRA_C (requires parser to generate code)
- meson.build
- mod_A
- meson.build
- subdir_A_A (requires parser to generate code)
- meson.build
- subdir_A_B (requires parser to generate code)
- meson.build
- mod_B
...
Somebody suggested: From the top level can you do a subdir straight into "mod_INFRA/libs/subdir_INFRA_A" and "apps/myparser" directories to build them, before returning to the top level and then subdir down a single level repeatedly thereafter? That did the trick,
I love Markdown + MathJax for note taking, and I've found the simplest way to do this is to use a small, local Jekyll server that I can backup using Git. It's simple, clean, private, and redundant; each document is a single human-readable file before processing, meaning I hope that in 20 years the notes aren't worthless.
My only problem is that I wish I could have a directory with subdirectories of Markdown files and to have Jekyll build everything recursively. For example, imagine I had something like this:
...
- research
- foo
- derivations
- derivation1.md
- derivation2.md
...
- meetings
- 20190912_meeting1.md
- 20190912_meeting2.md
...
- bar
- derivations
- meetings
- personal
- courses
- qux
- baz
...
I would love to automatically render and a locally host a web server in which each directory is an index page, and each .md file is a document.
Is it possible to do this relatively easily in Jekyll? I've seen some stuff using nested collections, but it's pretty messy and manual.
I need Bamboo to build the project automatically when a file in "api" subfolder changes. When a file in any other subfolder changes the bamboo build plan shouldn't run.
Folder structure:
project
- api
- ui
- core
In the Plan Configuration repositories tab, from the "Include / exclude files" dropdown I have selected the following option
Include only changes that matches the following pattern
and I have tried the following patterns:
.*/api/.*
api/
api/*
api\/*
api/**
/api/*
but the build plan isn't running. With "Include / exclude files" dropdown set to None the build plan runs (but does so when a file changes in any other subfolder also)
I can't split the project up to different repositories.
What pattern should I use or is there any other solution for this?
Pattern that ended up working was
api/.*
It's a regular expression from the root of the checkout supposedly, although I have not used this feature. Here are some of their examples:
https://confluence.atlassian.com/display/BAMBOO052/_planRepositoryIncludeExcludeFilesExamples?_ga=2.91083610.1778956526.1502832020-118211336.1443803386
What you might try is let it checkout the whole thing without the include filter set, and don't let it delete the working directory. Look on the filesystem and verify the path from the root of the working directory. Then test your regex against the whole path relative from that working directory.