name: README build permissions: contents: write on: push: branches: - main schedule: - cron: "0 4 * * *" workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 1 - name: Get Python 3.11 uses: actions/setup-python@v4 with: python-version: '3.11' cache: 'pip' cache-dependency-path: cache/requirements.txt - name: Install dependencies run: python -m pip install -r cache/requirements.txt - name: Update README file env: ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} USER_NAME: ${{ secrets.USER_NAME }} run: python today.py - name: Commit run: |- git add . git diff git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" git commit -m "[BOT] auto update README - $(date +'%Y-%m-%d')" -a || echo "No changes to commit" git push