-
Notifications
You must be signed in to change notification settings - Fork 136
42 lines (36 loc) · 1.03 KB
/
image_resize.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
name: Resize images
on:
# Enables a button on Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
with:
ref: main
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install gdown
pip install requests
pip install pillow
pip install googledrivedownloader
- name: Resize student images
run: |
cd ./python_scripts
python3 resize_student_images.py
python3 resize_staff_images.py
cd ../
- name: Commit and push into the main branch
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add --all
git commit -m "Resize images (Github Action)" || echo "No changes"
git push