Skip to content

Generate Platane snk #33

Generate Platane snk

Generate Platane snk #33

Workflow file for this run

name: Generate Platane snk
on:
push:
branches: [ main ]
workflow_dispatch:
schedule:
- cron: "50 22 * * 5"
permissions:
pull-requests: write
contents: write
repository-projects: write
jobs:
Setup_And_Run_And_Push:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v4
- name: Setup Platane
uses: Platane/snk@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
generated/github-snake.svg
generated/github-snake-ocean.gif?color_snake=orange&color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9
- name: Commit files
id: commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "wcoder"
git add --all
if [-z "$(git status --porcelain)"]; then
echo "::set-output name=push::false"
else
git commit -m "Add changes" -a
echo "::set-output name=push::true"
fi
shell: bash
- name: Push changes
if: steps.commit.outputs.push == 'true'
# 这个也可以https://github.com/crazy-max/ghaction-github-pages
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true