-
Notifications
You must be signed in to change notification settings - Fork 2.8k
49 lines (39 loc) · 1.24 KB
/
update_readmes.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
40
41
42
43
44
45
46
47
48
49
name: Update READMEs
on:
push:
paths:
- '.github/scripts/listings.json'
workflow_dispatch:
concurrency:
group: listings_update
cancel-in-progress: true
jobs:
run-python-script:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: execute update_readmes.py
id: python_script
run: python .github/scripts/update_readmes.py
- name: commit files
if: success()
run: |
git config --local user.email [email protected]
git config --local user.name 'Github Action'
git add README.md
git add README-Off-Season.md
git diff-index --quiet HEAD || (git commit -a -m "${{ steps.python_script.outputs.commit_message }}" --allow-empty)
- name: push changes
if: success()
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: dev
- name: Problem With Action
run: echo "There was an error with the github action. ${{ steps.python_script.outputs.error_message }}"
if: failure()