Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New questions - GitHub Actions #242

Merged
merged 19 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions content/questions/actions/question-110.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
question: "Dave is creating a templated workflow for his organization. Where must Dave store the workflow files and associated metadata files for the templated workflow?"
archetype: "questions"
title: "Question 110"
draft: false
---


> https://docs.github.com/en/actions/using-workflows/creating-starter-workflows-for-your-organization
1. [x] inside a directory named `workflow-templates` within a repository named `.github`
1. [ ] inside a directory named `workflow-templates` within the current repository
1. [ ] inside a directory named `.github/org-templates`
1. [ ] inside a directory named `.github/workflow-templates`
12 changes: 12 additions & 0 deletions content/questions/actions/question-111.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
question: "Doston wants to be notified when a comment is created on an issue within a GitHub repository. Which event should be used within the configuration?"

Check warning on line 2 in content/questions/actions/question-111.md

View workflow job for this annotation

GitHub Actions / spell-check

Unknown word (Doston)
FidelusAleksander marked this conversation as resolved.
Show resolved Hide resolved
archetype: "questions"
title: "Question 111"
draft: false
---

> https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment
1. [x] `issue_comment`
1. [ ] `issues.comment`
1. [ ] `issues`
1. [ ] `comment`
12 changes: 12 additions & 0 deletions content/questions/actions/question-112.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
question: "What level of access is required on a GitHub repository in order to delete log files from workflow runs?"
archetype: "questions"
title: "Question 112"
draft: false
---

> https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs
1. [x] write
1. [ ] read
1. [ ] admin
1. [ ] owner
26 changes: 26 additions & 0 deletions content/questions/actions/question-113.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
question: "What is true about the following workflow configuration if triggered against the `myorg/my-dev-repo` repository?"

Check warning on line 2 in content/questions/actions/question-113.md

View workflow job for this annotation

GitHub Actions / spell-check

Unknown word (myorg)
FidelusAleksander marked this conversation as resolved.
Show resolved Hide resolved
archetype: "questions"
title: "Question 113"
draft: false
---

```yaml
name: deploy-workflow
on: [push]
jobs:
production-deploy:
if: github.repository == 'myorg/my-prod-repo'

Check warning on line 13 in content/questions/actions/question-113.md

View workflow job for this annotation

GitHub Actions / spell-check

Unknown word (myorg)
FidelusAleksander marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
- run: npm install -g bats
```
> https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution
1. [x] the `production-deploy` job will be marked as skipped
1. [ ] the `production-deploy` job will error
1. [ ] the `production-deploy` job will execute three steps
1. [ ] the `production-deploy` job will run if the `node-version` is `14`
20 changes: 20 additions & 0 deletions content/questions/actions/question-114.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
question: "How can you access the current values of variables in a matrix within a job in the example below:"
archetype: "questions"
title: "Question 114"
draft: false
---

```yaml
jobs:
example_matrix:
strategy:
matrix:
version: [10, 12, 14]
os: [ubuntu-latest, windows-latest]
```
> https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy
1. [x] reference variables through the `matrix` context with syntax like`matrix.version` and `matrix.os`
1. [ ] by using the `matrix.property` syntax
1. [ ] by using the `context` keyword within the job configuration
1. [ ] by accessing the variables directly with the syntax `version` and `os`
Loading