This repository has been archived by the owner on Dec 10, 2023. It is now read-only.
Merge pull request #30 from anas-stuff/0x61nas-patch-1 #1438
Workflow file for this run
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: Change cover image | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: "0 */24 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.7] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r photo/requirements.txt | |
- name: Change the branch | |
run: | | |
git checkout -B media/cover | |
rm -rf * | |
- name: Pull an random cover from ur pinterest | |
run: | | |
cd photo | |
python anime.py "${{ secrets.PINTEREST_EMAIL }}" "${{ secrets.PINTEREST_PASSWORD }}" "${{ secrets.PINTEREST_USERNAME }}" | |
- name: Commit new cover | |
run: | | |
git config user.name github-action | |
git config user.email github-actions@github.com | |
git add . | |
git commit -am "chore(cover): change cover image" | |
git push -f https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git |