-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (56 loc) · 1.72 KB
/
Copy pathpython-app.yml
File metadata and controls
62 lines (56 loc) · 1.72 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches: [ "main" ]
paths:
- 'content/anti-patterns/**'
- 'content/patterns/**'
#pull_request:
# branches: [ "main" ]
permissions:
contents: write
actions: write
issues: write
pull-requests: write
repository-projects: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
github_token: ${{ secrets.TOKEN_GITHUB }}
branch: main
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install markdown
pip install pyyaml
pip install python-frontmatter
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run python python_script/infosPatternToJson.py
run: |
python python_script/infosPatternToJson.py
- name: Git authentification
run: |
git config --global user.name "ntenieres-bib"
git config --global user.email "nathan.tenieres@michelin.com"
- name: Check for changes
run: git status
- name: Stage changed files
run: git add .
- name: Commit changed files
run: git commit -m "Updating JSON file"
- name: Fetch from master
run: git fetch origin main
- name: Push changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.TOKEN_GITHUB }}
branch: main