8000 upate · flexbox/github-bootcamp@dc390eb · GitHub
[go: up one dir, main page]

Skip to content

Commit dc390eb

Browse files
committed
upate
1 parent 4e38847 commit dc390eb

File tree

1 file changed

+50
-6
lines changed

1 file changed

+50
-6
lines changed

challenges/103/02.md

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
- Here is the list of [GitHub actions events](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
1010

11-
## 👨‍🚀 Exercise 1
11+
## 👨‍🚀 Exercise 2.1
1212

13-
- [ ] Create a Push Event
13+
- [ ] Create a **Push Event**
1414

1515
```yml
1616
name: CI on Push
@@ -31,16 +31,16 @@ jobs:
3131
3232
- [ ] Commit to your repository to launch the action
3333
34-
## 👨‍🚀 Exercise 2
34+
## 👨‍🚀 Exercise 2.2
3535
36-
- [ ] Create a Pull Request Event
36+
- [ ] Create a **Pull Request Event**
3737
3838
```yml
3939
name: CI on Pull Request
4040
on:
4141
pull_request:
4242
branches:
43-
- master
43+
- main
4444

4545
jobs:
4646
test:
@@ -50,4 +50,48 @@ jobs:
5050
uses: actions/checkout@v2
5151
- name: Run a one-line script
5252
run: echo Hello, Pull Request Event!
53-
```
53+
```
54+
55+
- [ ] Commit to your repository to launch the action
56+
57+
## 👨‍🚀 Exercise 2.3
58+
59+
- [ ] Create a **Schedule Event**
60+
61+
```yml
62+
name: Nightly build
63+
on:
64+
schedule:
65+
- cron: '0 0 * * *'
66+
67+
jobs:
68+
build:
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Checkout code
72+
uses: actions/checkout@v2
73+
- name: Run a one-line script
74+
run: echo Hello, Scheduled Event!
75+
```
76+
77+
In this example, the workflow runs every day at midnight (UTC).
78+
79+
## 👨‍🚀 Exercise 2.4
80+
81+
- [ ] Create a **Release Event**
82+
83+
```yml
84+
name: Build on Release
85+
on:
86+
release:
87+
types: [created]
88+
89+
jobs:
90+
build:
91+
runs-on: ubuntu-latest
92+
steps:
93+
- name: Checkout code
94+
uses: actions/checkout@v2
95+
- name: Run a one-line script
96+
run: echo Hello, Pull Request Event!
97+
```

0 commit comments

Comments
 (0)
0