Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 9 question 10 discussion

Actual exam question from Microsoft's AZ-400
Question #: 10
Topic #: 9
[All AZ-400 Questions]

DRAG DROP
-

You have a GitHub repository named repo1 that stores the code of an app named App1. You need deploy a workflow for repo1 by using GitHub Actions. The solution must meet the following requirements:

• Scan on pushes to the main branch.
• Scan on pull requests to the main branch.
• Scan on pull requests to any branch that has a prefix of releases/.
• Scan all the files in the subdirectories of the src directory.

How should you complete the code? To answer, drag he appropriate values to the correct targets. Each value may be used once, more than once, or not at all.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
vsvaid
Highly Voted 11 months, 1 week ago
1. - 'releases/**' 2. - 'src/**' 3. - '**/*.md'
upvoted 11 times
...
mfawew223
Highly Voted 1 year ago
I know a previous question had a reference to .md files, but this one does not. One of the requirements is: Scan all the files in the subdirectories of the src directory. Emphasis here on SUBDIRECTORIES, so we dont want files from the src directory itself? So would that mean the 3rd field is: src/* This leaves us with the logic: includes says "include all files in src directory and its subdirectories", and then the paths-ignore acts on top of that and removes the files in the src directory, but leaves the subdirectory files in place So: 1. - 'releases/**' 2. - 'src/**' 3. - 'src/*'
upvoted 8 times
mfawew223
1 year ago
After reviewing some more, this source (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore) says you cant use both paths and paths-ignore in the push/pull_request event: Use the paths filter when you want to include file path patterns or when you want to both include and exclude file path patterns. Use the paths-ignore filter when you only want to exclude file path patterns. You cannot use both the paths and paths-ignore filters for the same event in a workflow. So...its straight up invalid to do it the way the question says? But if md is not int he question and we only want to include SUBDIRECTORIES of src and not the files in src directory itself, my solution does follow the general paths then paths-ignore logic (adding ignore logic after includes logic will removes the "ignore" matches from the set gathered in the "include")
upvoted 2 times
...
...
ahmedMN
Most Recent 6 days, 4 hours ago
same as topic 5 question 5 and same anwser there : 1. - 'releases/**' 2. - 'src/**' 3. - '**/*.md'
upvoted 1 times
...
Kent_020
1 year, 1 month ago
1. - 'releases/**' 2. - 'src/**' 3. - '**/*.md'
upvoted 4 times
ServerBrain
10 months, 3 weeks ago
Correct,💯
upvoted 1 times
...
...
ieboaix
1 year, 3 months ago
another version reference to https://www.examtopics.com/discussions/microsoft/view/96638-exam-az-400-topic-5-question-24-discussion/
upvoted 2 times
...
yana_b
1 year, 3 months ago
In the question there is nothing mentioned for ignoring files, but in the solution we see option *.md . Not quite sure what needs to be ignored as per the question itself. *.md -> the wildcard matches any character but does not match the slash sign => matches all .md files that are in the root of the repository **.md -> matches all files in the repository docs/**/*.md -> A file with a .md suffix anywhere in the docs directory. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
upvoted 2 times
...
iwillpassaz400
1 year, 4 months ago
1. release/** https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#using-filters 2. src/** 3. *.md or **/*.md it doesn't say if there are .md files in subdirectories https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#patterns-to-match-file-paths
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...