Skip to content

Commit b41656a

Browse files
committed
Update
1 parent 2682df8 commit b41656a

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 02 - Workflow Events v2
2+
# Wersja rozszerzona — push, pull_request, schedule, workflow_dispatch
3+
4+
on:
5+
#push:
6+
pull_request:
7+
branches:
8+
- CW02_03_2026
9+
schedule:
10+
- cron: "*/2 * * * *" # co 2 minuty
11+
workflow_dispatch:
12+
13+
jobs:
14+
echo:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Show the trigger
18+
run: |
19+
echo "Event name: ${{ github.event_name }}"
20+
21+
# Commit & push:
22+
# ```bash
23+
# git add .github/workflows/02-workflow-events.yaml
24+
# git commit -m "Exercise 02: add PR, schedule and manual triggers"
25+
# git push
26+
# ```
27+
28+
# Jak przetestować:
29+
# - pull_request: utwórz nowy branch, zmień coś, otwórz PR → workflow ruszy na pull_request.
30+
# - schedule: poczekaj na najbliższe okno crona (albo ustaw bliższy czas, np. co godzinę: 0 * * * *).
31+
# - workflow_dispatch (z UI):
32+
# Actions → wybierz 02 - Workflow Events → Run workflow.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 02 - Workflow Events v3
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
echo:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Show the trigger
11+
run: |
12+
echo "Event name: ${{ github.event_name }}"
13+
14+
# Commit & push:
15+
# ```bash
16+
# git add .github/workflows/02-workflow-events.yaml
17+
# git commit -m "Exercise 02: keep only workflow_dispatch trigger"
18+
# git push
19+
# ```

0 commit comments

Comments
 (0)