-
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (40 loc) · 1.31 KB
/
main.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: weekly-project-tier-table-generator
on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
jobs:
run-python-script:
runs-on: ubuntu-latest
env:
TZ: 'America/New_York' # Setting timezone for the job
steps:
- name: Checkout repository content
uses: actions/checkout@v3
with:
token: ${{ secrets.MY_GITHUB_TOKEN }} # Using the token for checkout
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Run Python script
run: python scripts/project_tier_table_generator.py
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
- name: Set Git user
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Commit and push if changed
run: |
git add -A
git diff-index --quiet HEAD || git commit -m "Update Project Tier Table and Badge Reference Guide"
git push
- name: Copy README.md to index.md
run: |
mkdir -p docs # ensures the docs directory exists
cp README.md docs/index.md # adjust the path as needed