```
- Go to Workflows menu (mentioned in step 1), click
Update Image Readme
, clickRun workflow
. - Go to your non-profile readme page, you will be able to see a random image from your collection of images.
- 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
.
- 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.
- 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
- 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
To run tests simply execute the following in the directory containing main.py
:
python -m unittest discover