rename to fix standards #11
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: 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}) |