-
Notifications
You must be signed in to change notification settings - Fork 66
50 lines (40 loc) · 1.25 KB
/
02-resize-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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