generate-awesome-wallpapers #44
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: generate-awesome-wallpapers | |
on: | |
# Run automatically everyday at 00:05 | |
# schedule: | |
# - cron: "5 0 * * *" | |
# Allows to manually run the job at any time | |
workflow_dispatch: | |
# Run on every push or pull request on main branch | |
push: | |
branches: [ "main" ] | |
permissions: | |
contents: write | |
# Only a single workflow in the same concurrency will run at the same time | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
generate_wallpaper: | |
name: Generate awesome wallpapers with Javascript | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the main branch | |
- uses: actions/checkout@v4 | |
# Uses action in the root directory to generate awesome wallpapers | |
- name: Generate awesome wallpapers | |
uses: huuquyet/generate-awesome-wallpapers@main | |
env: | |
HF_API_TOKEN: ${{ secrets.HF_API_TOKEN }} | |
with: | |
random: true | |
# Push awesome wallpapers to main branch | |
# Note: the following account information will not work on GHES | |
- name: Push the awesome wallpapers to main branch | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m ":robot: Generated awesome wallpaper [skip ci]" | |
git push |