Skip to content

Commit c0cd71b

Browse files
committedDec 17, 2024
updating contexts workflow example
1 parent f357322 commit c0cd71b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎_posts/2024-06-14-github-context.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ _Printing the GitHub context_
4747
You can even use the contexts in expressions. For example, we can conditionally run a job based on the labels of an issue that triggered the workflow:
4848

4949
```yml
50+
name: Printing issue if 'new-repo' label is present
51+
5052
on:
5153
issues:
5254
types: [opened]
@@ -85,6 +87,12 @@ This can be super helpful for IssueOps and LabelOps scenarios!
8587
You can do the same thing to print out the other contexts as well. Here's a full workflow example:
8688

8789
```yml
90+
name: Write Contexts to Log
91+
92+
on:
93+
push:
94+
workflow_dispatch:
95+
8896
jobs:
8997
write_contexts_to_log:
9098
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)