-
Notifications
You must be signed in to change notification settings - Fork 54
39 lines (37 loc) · 1.54 KB
/
update_structured_experiments_readme.yml
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
31
32
33
34
35
36
37
38
39
# Unless specified, the working directory is the root of the repo
# This is the name displayed on GitHub under the actions tab
name: structured-experiments-auto-update
# Defines what repository event triggers the action
on:
# Triggers the workflow on push
push:
# Restricts the trigger to the structured experiments directory and sub-directories
paths:
- 'structured_experiments/**'
# Only triggers when push is to the main branch
branches: [ main ]
# Defines an individual job
jobs:
# Operating system the runner is built with
build:
runs-on: ubuntu-latest
# Defines each step of this job
steps:
# Checks out repo under the $GITHUB_WORKSPACE so the workflow has access
- uses: actions/checkout@v2
# Executes the python file to modify the readme
- name: update structured experiments readme
run: python ./.github/workflows/update_structured_experiments_readme.py ./structured_experiments
# Commits the changes using the Actions credentials with a commit message
- name: commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "update structured experiments readme" -a
# Pushes the changes to main branch using the repository secret Github token
- name: push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main