Skip to content

Update Wallpapers READMEs #24

Update Wallpapers READMEs

Update Wallpapers READMEs #24

Workflow file for this run

name: Update Wallpapers READMEs
on:
push:
branches:
- main
schedule:
# Run every Monday at 3:00 AM UTC
- cron: '0 3 * * 1'
workflow_dispatch:
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.4'
- name: Generate READMEs
run: |
cd .github
go run .
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
COMMIT_MSG: |
[README] Generated readmes.
run: |
git config user.email "actions@github"
git config user.name "Github Actions"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git add .
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF})