.github/workflows/check-repo-changes.yml #155399
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 3 * * 1' | |
jobs: | |
check-stale-repos: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Generate Awesome Italia | |
run: python generate_md.py | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check for the stale report issue | |
run: | | |
ISSUE_NUMBER=$(gh search issues "Stale repository report" --label "stale-report" --match title --json number --jq ".[0].number") | |
echo "issue_number=$ISSUE_NUMBER" >> "$GITHUB_ENV" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: peter-evans/create-issue-from-file@v4 | |
with: | |
issue-number: ${{ env.issue_number }} | |
title: Stale repository report | |
content-filepath: ./stale_repos.md | |
labels: stale-report | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: "chore: update awesome italia" | |
title: Update Awesome Italia | |
body: This PR updates Awesome Italia files | |
branch: update-awesome-italia | |
token: ${{ secrets.GITHUB_TOKEN }} |