Collect Internship Results #51
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: Collect Internship Results | |
on: | |
schedule: | |
- cron: '0 0 * * 3' # This line schedules the workflow to run at 00:00 every Wednesday | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install | |
- name: Clean output directory | |
run: rm output/filtered_results.csv output/results.csv output/table.md || true | |
- name: Run Script | |
run: | | |
poetry run python main.py --job_categories "software" --job_titles "engineer" "engineering" "developer" --job_types "intern" | |
- name: Move output files | |
run: | | |
mkdir -p output/output-internships | |
mv -f output/filtered_results.csv output/output-internships/filtered_results.csv || true | |
mv -f output/results.csv output/output-internships/results.csv || true | |
mv -f output/table.md output/output-internships/table.md || true | |
# TODO: merge from origin/main before committing | |
- name: Commit changes | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Update Results" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "Update Results" | |
title: "Update Internship Results" | |
body: "" | |
branch: "update-results-internships" |