Skip to content

Commit f6bf725

Browse files
authored
Update 2-github-actions-workflows-ci.md
1 parent b541e0d commit f6bf725

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

learn-pr/github/github-actions-ci/includes/2-github-actions-workflows-ci.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -131,29 +131,29 @@ Understanding what triggered a GitHub Actions workflow—whether it was a push t
131131

132132
### What is a workflow trigger?
133133
A workflow trigger is an event that causes a workflow to start. GitHub supports various types of triggers, including:
134-
- push or pull_request (based on code changes)
135-
- workflow_dispatch (manual trigger)
134+
- `push` or `pull_request` (based on code changes)
135+
- `workflow_dispatch` (manual trigger)
136136
- schedule (cron jobs)
137-
- repository_dispatch (external systems)
137+
- `repository_dispatch` (external systems)
138138
- Issue, discussion, and PR events (e.g., issues.opened, pull_request.closed)
139139

140140
### Where to identify the trigger event?
141-
You can identify the trigger event in several ways :
141+
You can identify the trigger event in several ways:
142142

143-
1 . From the GitHub Actions UI
143+
1. From the GitHub Actions UI
144144
- Navigate to the Actions tab in your repository.
145145
- Click on a workflow run.
146-
- The event type (e.g., push, pull_request, workflow_dispatch) is displayed at the top of the workflow run summary.
146+
- The event type (e.g., `push`, `pull_request`, `workflow_dispatch`) is displayed at the top of the workflow run summary.
147147

148-
2 . Using github.event_name in Logs or workflow
148+
2. Using github.event_name in Logs or workflow
149149
- GitHub exposes context data during a workflow run. The github.event_name variable tells you which event triggered the workflow.
150150
- You can print it in a step for debugging:
151151

152152
```yml
153153
-name: Show event trigger
154154
run: echo "Triggered by ${{ github.event_name }}"
155155
```
156-
3 . Using workflow Run details
156+
3. Using workflow Run details
157157
- If you're inspecting workflow runs programmatically (e.g., via the API), the run object includes an event property that specifies the trigger.
158158
- You can also find the commit SHA, actor, and timestamp to trace what caused the trigger.
159159

@@ -183,7 +183,7 @@ These practices help with debugging, auditing, and improving workflow reliabilit
183183
To describe a workflow's effects from reading its configuration file, you need to analyze the structure and contents of the ".yml" file stored in .github/workflows/. This file outlines when the workflow runs, what it does, and how it behaves under different conditions.
184184

185185
### Interpret a workflow's effects:
186-
1 . Identify the trigger (on:)
186+
1. Identify the trigger (on:)
187187
This section tells you when the workflow is initiated. For example:
188188
```yml
189189
on:
@@ -198,7 +198,7 @@ Effect:
198198
- Runs when a pull request is created or updated.
199199
- Can also be triggered manually by a user
200200

201-
2 . Understand the jobs and steps (jobs:)
201+
2. Understand the jobs and steps (jobs:)
202202
Jobs describe what the workflow will do. For instance:
203203
```yml
204204
jobs:
@@ -218,11 +218,11 @@ Effect:
218218
- Installs project dependencies.
219219
- Runs automated tests.
220220

221-
3 . Evaluate the purpose and outcome
221+
3. Evaluate the purpose and outcome
222222
- By reading the configuration, you can describe the intended outcome of the workflow:
223223
“This workflow is a Continuous Integration (CI) pipeline. It ensures that any new code pushed to the repository or submitted via pull request is automatically tested. If tests fail, the workflow will indicate this in the GitHub UI, helping maintain code quality.”
224224

225-
4 . Optional features affecting behavior
225+
4. Optional features affecting behavior
226226
- env: sets environment variables.
227227
- if: adds conditional logic to run certain steps only when criteria are met.
228228
- timeout-minutes: or continue-on-error: influence execution behavior and error handling.
@@ -276,8 +276,7 @@ If this step failed, check:
276276
### 1. Go to the repository
277277
Navigate to the repository that contains the workflow.
278278
### 2. Click on the Actions tab
279-
- Located in the top navigation bar of the repo.
280-
- This shows a history of all workflow runs for that repository.
279+
Navigate to Actions tab located in the top navigation bar of the repo. This tab shows a history of all workflow runs for that repository.
281280

282281
### 3. Select the workflow name
283282
- Choose the relevant workflow from the list.
@@ -290,7 +289,7 @@ You'll see a link named CI Workflow in the list.
290289
- You’ll see a list of runs with status indicators
291290
- Click on the timestamp or commit message of the specific run you want to inspect.
292291

293-
### 5. Expand each job and step
292+
### 5. Expand each job and step
294293
- The run summary page displays jobs as defined in the workflow file (e.g., build, test).
295294
- Click on a job to expand it.
296295
- Inside the job, expand individual steps (e.g., "Install dependencies", "Run tests").

0 commit comments

Comments
 (0)