forked from Asabeneh/30-Days-Of-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (27 loc) · 910 Bytes
/
run_examples.yml
File metadata and controls
30 lines (27 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Run examples
on: [push]
permissions:
contents: write
jobs:
test_run_examples:
runs-on: ubuntu-latest
name: A job to run examples
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clear result files ahead
run: rm -rf output/
- name: Run examples
uses: gitx-io/ActionServerless@master
with:
filepath: ./01_Day_Introduction ./02_Day_Variables_builtin_functions ./03_Day_Operators ./04_Day_Strings ./05_Day_Lists
- name: Git commit
run: |
# git commit if there's any change
if test -n "$(git status --porcelain 2>/dev/null)"; then
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Add changes"
git push origin ${GITHUB_REF##*/}
fi