Final Fix: Rank Algorithm #131
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: Update Leaderboard and Resize Images | |
on: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
update-leaderboard-and-resize-images: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests==2.31.0 | |
pip install --upgrade Pillow | |
- name: Configure Git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "mlsanigeria" | |
- name: Pass Environment Variables and Run Scripts | |
env: | |
API_TOKEN: ${{ secrets.API_TOKEN }} | |
run: | | |
# Pass the API_TOKEN secret as an environment variable to your script | |
python update_leaderboard.py | |
python resize_image_data.py | |
- name: Check for changes | |
id: check_changes | |
run: | | |
git diff --exit-code || echo "::set-output name=changes::true" | |
- name: Commit and Push Changes | |
if: steps.check_changes.outputs.changes == 'true' | |
run: | | |
git pull | |
git add . | |
git commit -m "Updated leaderboard and resized images for Project 1." | |
git remote set-url origin https://[email protected]/mlsanigeria/AI-Hacktober-MLSA.git | |
git push |