added images of a bungalow and a storey building #14
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: Resize Images | |
on: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
resize-image: | |
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 --upgrade Pillow | |
- name: Configure Git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "mlsanigeria" | |
- name: Run script | |
env: | |
API_TOKEN: ${{ secrets.API_TOKEN }} | |
run: | | |
# Pass the API_TOKEN secret as an environment variable to your script | |
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 add . | |
git commit -m "Resized images for Project 1" | |
git remote set-url origin https://[email protected]/mlsanigeria/AI-Hacktober-MLSA.git | |
git push |