File tree Expand file tree Collapse file tree 10 files changed +32
-33
lines changed
Expand file tree Collapse file tree 10 files changed +32
-33
lines changed Original file line number Diff line number Diff line change 11version : 2
22
33updates :
4- - package-ecosystem : ' github-actions'
5- directory : ' / '
4+ - package-ecosystem : " github-actions"
5+ directory : " / "
66 schedule :
7- interval : ' monthly'
7+ interval : " monthly"
88
9- - package-ecosystem : ' pip'
10- directory : ' / '
9+ - package-ecosystem : " pip"
10+ directory : " / "
1111 schedule :
12- interval : ' monthly'
12+ interval : " monthly"
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Basic
33on :
44 push :
55 schedule :
6- - cron : ' 0 0 1 * *' # midnight every month (utc )
6+ - cron : " 0 0 1 * *" # Midnight every month (UTC )
77 workflow_dispatch :
88
99jobs :
1616 - name : Setup python
1717 uses : actions/setup-python@v5
1818 with :
19- python-version : ' 3.x'
20- cache : ' pip'
19+ python-version : 3.x
20+ cache : pip
2121
2222 - name : Show python version
2323 run : |
Original file line number Diff line number Diff line change 44 pull_request :
55 push :
66 schedule :
7- - cron : ' 0 0 1 * *' # midnight every month (utc )
7+ - cron : " 0 0 1 * *" # Midnight every month (UTC )
88 workflow_dispatch :
99
1010env :
11- BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
11+ BRANCH_NAME : " ${{ github.head_ref || github.ref_name }}"
1212
1313jobs :
1414 build :
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Context
33on :
44 push :
55 schedule :
6- - cron : ' 0 0 1 * *' # midnight every month (utc )
6+ - cron : " 0 0 1 * *" # Midnight every month (UTC )
77 workflow_dispatch :
88
99jobs :
1414 - name : Env context
1515 run : echo '${{ toJson(env) }}'
1616 env :
17- GREETING : ' Hello, World!'
17+ GREETING : " Hello, World!"
1818
1919 - name : Job context
2020 run : echo '${{ toJson(job) }}'
Original file line number Diff line number Diff line change @@ -3,21 +3,21 @@ name: Env Var
33on :
44 push :
55 schedule :
6- - cron : ' 0 0 1 * *' # midnight every month (utc )
6+ - cron : " 0 0 1 * *" # Midnight every month (UTC )
77 workflow_dispatch :
88
99env :
10- JAN : ' January'
11- FEB : ' February'
12- MAR : ' March'
10+ JAN : " January"
11+ FEB : " February"
12+ MAR : " March"
1313
1414jobs :
1515 read_one :
1616 runs-on : ubuntu-latest
1717 env :
18- RED : ' FF0000'
19- GREEN : ' 00FF00'
20- BLUE : ' 0000FF'
18+ RED : " FF0000"
19+ GREEN : " 00FF00"
20+ BLUE : " 0000FF"
2121
2222 steps :
2323 - name : Show months, colors, and numbers
3434 echo "TWO is '${TWO}'"
3535 echo "THREE is '${THREE}'"
3636 env :
37- ONE : ' 1 '
38- TWO : ' 2 '
39- THREE : ' 3 '
37+ ONE : " 1 "
38+ TWO : " 2 "
39+ THREE : " 3 "
4040
4141 - name : Show months and colors (numbers are in another scope and therefore undefined)
4242 run : |
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Env Var PATH
33on :
44 push :
55 schedule :
6- - cron : ' 0 0 1 * *' # midnight every month (utc )
6+ - cron : " 0 0 1 * *" # Midnight every month (UTC )
77 workflow_dispatch :
88
99jobs :
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: GitHub Script
33on :
44 push :
55 schedule :
6- - cron : ' 0 0 1 * *' # midnight every month (utc )
6+ - cron : " 0 0 1 * *" # Midnight every month (UTC )
77 workflow_dispatch :
88
99jobs :
1515 uses : actions/github-script@v7
1616 id : set-result
1717 with :
18- result-encoding : string # choices are ' string' and ' json' (defaults to ' json' if omitted)
18+ result-encoding : string # choices: string, json (defaults to json if omitted)
1919 script : return "Hello, World!"
2020
2121 - name : Get string
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Homebrew
33on :
44 push :
55 schedule :
6- - cron : ' 0 0 1 * *' # midnight every month (utc )
6+ - cron : " 0 0 1 * *" # Midnight every month (UTC )
77 workflow_dispatch :
88
99jobs :
@@ -12,10 +12,10 @@ jobs:
1212
1313 steps :
1414 - name : Check brew
15- run : which brew || echo ' Program not found'
15+ run : which brew || echo " Program not found"
1616
1717 - name : Check fortune
18- run : which fortune || echo ' Program not found'
18+ run : which fortune || echo " Program not found"
1919
2020 - name : Setup homebrew
2121 uses : Homebrew/actions/setup-homebrew@master
Original file line number Diff line number Diff line change 1- # Demo: GitHub Actions
1+ # GitHub Actions
22
3- A collection of GitHub Actions workflows where I demonstrate various capabilities and features.
3+ A collection of GitHub Actions workflows demonstrating various capabilities and features.
44
55They serve as a quickstart and reference for my future self. Each are described below.
66
Original file line number Diff line number Diff line change 1- # something for the basic.yml workflow to run
2-
31def test_basic ():
2+ # Simple test for basic.yml to run.
43 assert 1 + 1 == 2
You can’t perform that action at this time.
0 commit comments