Skip to content

Create Random GIFs

Create Random GIFs #5

Workflow file for this run

name: Create Random GIFs
on:
schedule:
- cron: "0 0 1 * *"
permissions:
contents: write
jobs:
create_random_gifs:
runs-on: ubuntu-latest
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
repo_user: "T3l3sc0p3"
repo_name: "CDN-for-personal-use"
branch: "Kuriyama-Mirai"
directory: "gifs"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
check-latest: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests pyyaml
- name: Create random gifs
run: |
file_name="README.md"
python ".github/script/random-gif.py" "$file_name" "p"
if [[ $(git status --porcelain) ]]; then
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add "$file_name"
git commit -m "Create random GIFs"
git push
else
echo "No changes detected"
fi