Free Microsoft GH-500 Actual Exam Questions - Question 5 Discussion
As a repository owner, you do not want to run a GitHub Actions workflow when changes are made to
any .txt or markdown files. How would you adjust the event trigger for a pull request that targets the
main branch? (Each answer presents part of the solution. Choose three.)
on:
pull_request:
branches: [main]
D with A and B feels right since paths-ignore is for skipping files, and A and B cover all .md and .txt files broadly. E is too narrow, focusing only on docs/*.md.
Probably D, A, and B since paths-ignore with those patterns excludes all .md and .txt files globally.
D paths-ignore is definitely needed to exclude files, and A and B cover all .md and .txt files globally. That seems simpler than targeting just docs/*.md with E.
Makes sense to use D since paths-ignore tells GitHub which files to skip, and E targets markdown files in the docs folder specifically. So, D, C, and E work together well here.
Option D plus C and E; C defines paths-ignore, and E targets markdown in docs folder.
Maybe D, plus A and B to cover both file types globally.
Maybe D for excluding globally, then A for markdown and B for txt files.
D for paths-ignore definitely plays the main role since you want to skip running the workflow on those file types. Then B for the .txt files and A for the .md files make sense to cover both extensions globally. E is too specific to docs/ folder, which the question doesn’t mention, so better to avoid that. C just introduces the block but doesn’t solve the ignoring part by itself. So D, B, and A seem like the most fitting trio here.
It’s D and C for sure, plus B to cover .txt files globally.
C/D/E? Using paths-ignore makes more sense here to exclude files, and specifying the folder like in E keeps it organized. C is needed to define the paths or paths-ignore block.
Is this about ignoring .txt and markdown files globally or just in specific folders?