ErickDaniel7 / wallpaper-day

Wallpaper of the day

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🌠 Wallpaper of the Day


Daily

```
  1. Go to Workflows menu (mentioned in step 1), click Update Image Readme, click Run workflow.
  2. Go to your non-profile readme page, you will be able to see a random image from your collection of images.

Examples

  1. If you want to use this action for a README that is not present in current workflow repository.
- uses: siddharth2016/update-readme-image@main
  with:
    GH_TOKEN: ${{ secrets.GH_TOKEN }}     # Needed if README repository is not profile repo
    README_REPOSITORY: <username>/<differentrepo>

Using README_REPOSITORY will change README present in that repository head.

For example, if your workflow is present in <username>/repo1 and you want to update README present in <username>/repo2, then assign README_REPOSITORY to <username>/repo2 in workflow at <username>/repo1.

  1. If your images are present in a different repository than current workflow repository.
- uses: siddharth2016/update-readme-image@main
  with:
    GH_TOKEN: ${{ secrets.GH_TOKEN }}     # Needed if README repository is not profile repo
    README_REPOSITORY: <username>/<differentrepo>  # Needed if README repository is not current repo
    IMG_PATH: <your-image-directory>        # Needed if images are not present in .github/images of image repository
    IMG_REPOSITORY: <username>/<imagerepo> 

It's better to have all images in .github/images to avoid any confusion and keep the images in same repository as of README and workflow repository.

  1. If you want to set image alt, height, width and alignment, then use these flags:
- uses: siddharth2016/update-readme-image@main
  with:
    GH_TOKEN: ${{ secrets.GH_TOKEN }}     # Needed if README repository is not profile repo
    README_REPOSITORY: <username>/<differentrepo>  # Needed if README repository is not current repo
    IMG_PATH: <your-image-directory>        # Needed if images are not present in .github/images of image repository
    IMG_REPOSITORY: <username>/<imagerepo>  # Needed if images are not present in current repo
    HEIGHT: 180px       # default
    WIDTH: 180px        # default
    ALIGN: right        # default
    IMG_ALT: Profile Image      # default
  1. You can specify a commit message to override the default "Update Readme Image".
- uses: siddharth2016/update-readme-image@main
  with:
    GH_TOKEN: ${{ secrets.GH_TOKEN }}     # Needed if README repository is not profile repo
    README_REPOSITORY: <username>/<differentrepo>  # Needed if README repository is not current repo
    IMG_PATH: <your-image-directory>        # Needed if images are not present in .github/images of image repository
    IMG_REPOSITORY: <username>/<imagerepo>  # Needed if images are not present in current repo
    HEIGHT: 180px       # default
    WIDTH: 180px        # default
    ALIGN: right        # default
    IMG_ALT: Profile Image      # default
    COMMIT_MESSAGE: <your-commit-message>       # default - Update Readme Image

Tests

To run tests simply execute the following in the directory containing main.py:

python -m unittest discover

Another intriguing action you would want to use - quote-readme

If you liked this Action and want to contribute to upgrade this utility, please create an issue or throw a PR !

About

Wallpaper of the day