Skip to content

Commit

Permalink
Add q49-q58 (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
FidelusAleksander authored Sep 6, 2023
1 parent 4eeb482 commit ba1e397
Show file tree
Hide file tree
Showing 11 changed files with 149 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/public
.idea/
.hugo_build.lock
.vscode/
17 changes: 17 additions & 0 deletions content/questions/question-049.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: "Question 049"
date: 2023-09-01T13:58:35+02:00
draft: false
subject: []
---

# Which is true about `Starter Workflows` ?

> https://docs.github.com/en/actions/using-workflows/creating-starter-workflows-for-your-organization
- [x] They allow users to leverage ready-to-use (or with minimal changes) workflow templates when using Github UI
- [x] Github provides and maintains starter workflows for different categories, languages and tooling
- [x] Your organization can create custom starter workflows for users in Your organization
- [ ] Starter workflows cannot call reusable workflows
- [ ] Starter workflows are a paid Github feature
- [ ] Starter workflows are provided ready-to-use and cannot be modified or enhanced
> https://docs.github.com/en/actions/using-workflows/using-starter-workflows#using-starter-workflows
20 changes: 20 additions & 0 deletions content/questions/question-050.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "Question 050"
date: 2023-09-04T11:22:42+02:00
draft: false
subject: []
---

# Secrets and configuration variables can be scoped to

> https://docs.github.com/en/actions/using-workflows/sharing-workflows-secrets-and-runners-with-your-organization#sharing-secrets-and-variables-within-an-organization
- [x] The entire organization, or selected repositories in an organization
- [x] A single repository
- [x] An environment in a repository
- [ ] An environment shared across multiple repositories
> Environments cannot be shared across repositories
- [ ] Multiple repositories that do not share an organization/enterprise
- [ ] A specific workflow in a repository
> Environment variables can be scoped to a workflow, configuration variables cannot
- [ ] A specific job in a workflow
> Environment variables can be scoped to a workflow, configuration variables cannot
13 changes: 13 additions & 0 deletions content/questions/question-051.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "Question 051"
date: 2023-09-04T11:22:44+02:00
draft: false
subject: []
---

# What are the three types of Actions?
> https://docs.github.com/en/actions/creating-actions/about-custom-actions#types-of-actions
1. [x] `Docker container actions`, `JavaScript Actions`, `Composite Actions`
1. [ ] `Python Actions`, `JavaScript Actions`, `Custom Actions`
1. [ ] `Docker container Actions`, `JavaScript Actions`, `Custom Actions`
1. [ ] `Docker container actions`, `Java Actions`, `Composite Actions`
12 changes: 12 additions & 0 deletions content/questions/question-052.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "Question 052"
date: 2023-09-04T11:22:46+02:00
draft: false
subject: []
---

# Is this statement true? `Docker container actions are usually slower than JavaScript actions`
> Docker container actions are slower than JavaScript actions
1. [x] True
1. [ ] False
> Because of the latency to build and retrieve the container, Docker container actions are slower than JavaScript actions.
12 changes: 12 additions & 0 deletions content/questions/question-053.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "Question 053"
date: 2023-09-04T11:43:17+02:00
draft: false
subject: []
---

# When creating a custom Github Action You have to store the source code in `.github/` directory
> https://docs.github.com/en/actions/creating-actions/about-custom-actions#choosing-a-location-for-your-action
1. [x] False
1. [ ] True
> That is true for `workflows`
17 changes: 17 additions & 0 deletions content/questions/question-054.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: "Question 054"
date: 2023-09-04T11:43:20+02:00
draft: false
subject: []
---

# When creating custom Github Actions - in what file all the action `metadata` has to be defined?

Metadata such as name or description of the action, the outputs or required inputs etc
> https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions
1. [x] In the `action.yml` or `action.yaml` file in the action repository
1. [ ] In the repository `README` file
> While it's good practice to do that, it's not a requirement for the action to work
1. [ ] It's edited in Github Marketplace UI when published for sharing
1. [ ] In the `action.yml` or `action.yaml` file in the action repository, but it is not required if the action is not meant to be shared and used by the public
> All actions require the metadata file.
16 changes: 16 additions & 0 deletions content/questions/question-055.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: "Question 055"
date: 2023-09-04T11:43:24+02:00
draft: false
subject: []
---

# A workflow was initially run on `commit A` and failed. You fixed the workflow with the subsequent `commit B`. When You re-run that workflow it will run with code from which commit?

`commit A` -> `commit B`
> https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs#about-re-running-workflows-and-jobs
1. [x] It will run with code from `commit B`
1. [ ] It will run with code from `commit A`
> Re-running a workflow uses the same commit SHA and Git ref of the original event that triggered the workflow run.
1. [ ] You cannot re-run workflows in GitHub Actions. You have to trigger a new workflow which will run with latest changes
1. [ ] It will trigger two workflows, one with code from `commit A` and one with code from `commit B`
13 changes: 13 additions & 0 deletions content/questions/question-056.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "Question 056"
date: 2023-09-04T11:43:22+02:00
draft: false
subject: []
---

# How can You require a workflow to be manually approved by a maintainer if the workflow run is targeting the `production` environment?
> https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment
1. [x] Using deployment protection rules
1. [ ] Setting the required required reviewers in the `production` workflow
1. [ ] Using branch protection rules
1. [ ] Manual approvals are not supported by Github Actions
13 changes: 13 additions & 0 deletions content/questions/question-057.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "Question 057"
date: 2023-09-06T12:18:39+02:00
draft: false
subject: []
---

# Which is true about environments?
> Each job in a workflow can reference a single environment.
1. [x] Each job in a workflow can reference a single environment.
1. [ ] Each workflow can reference a single environment.
1. [ ] Each job in a workflow can reference a maximum of two environments.
1. [ ] Each workflow can reference a maximum of two environments.
15 changes: 15 additions & 0 deletions content/questions/question-058.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "Question 058"
date: 2023-09-06T12:18:42+02:00
draft: false
subject: []
---

# When using Github Actions to access resources in one of the cloud providers (such as AWS, Azure or GCP) the safest and recommended way to authenticate is
> https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect
1. [x] Using OIDC
1. [ ] Using Vault
1. [ ] Storing access keys in `secrets`
> Using long lasting access keys is not recommended in case of any security leaks or attacks such as [script injection](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections)
1. [ ] Storing access keys in `variables`
> No sensitive values should be stored in `variables`

0 comments on commit ba1e397

Please sign in to comment.