weekly-project-tier-table-generator #341
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |