Skip to content

Files

Latest commit

3d9b708 · Oct 4, 2022

History

History
84 lines (51 loc) · 2.87 KB

README.md

File metadata and controls

84 lines (51 loc) · 2.87 KB

Welcome

About

The README Bot is in charge of keeping repositories up to date, ensuring that all download links lead to the most recent version of LaraDumps.

LaraDumsp repositories:

Get Started

Key

🔐 A password key is required to prevent accidental activation of this software and must be provided via file or ENV var.

You must create a .key file containing the application key:

READMEBOT_KEY=12345

Composer scripts are configured to load this file automatically for development purposes.

Prepare the files

The Bot scans files, searching for these specific HTML comment tags:

<!--LaraDumpsVersion-->
<!--EndOfLaraDumpsVersion-->

You cam see a full example here.

Running the bot

1️⃣ You must pass the latest LaraDumps SemVer version via the argument --new-version. If running tests,pass --fake-version for a fake version.

2️⃣ You must pass the --github-credential argument containing the GitHub LaraDumps Bot credentials in JSON Format.

If you don't want to commit changes, pass the --no-commit argument.

You may exclude files from replacing by passing the --exclude--files=<FILES> with a comma-separated file list.

Example:

# Update the latest version from Repository
php .github/readmebot update-version --new-version='1.2.4' --github-credential='{"username":"foo","email":"foo@bar.com"}' --exclude-files='README.md,doc/example/example.md'

# For testing
php .github/readmebot update-version --fake-version --github-credential='{"username":"foo","email":"foo@bar.com"}' --exclude-files='README.md,doc/example/example.md'

Configuring GitHub Actions

Target repository

Copy the readmebot workflow file into the .github/workflows folder.

LaraDumps App Repository

Add the target repository to the wake_up_bots.yml GitHub Action in the LaraDumps Desktop APP repository.

The App repository must have the secrets variable READMEBOT_TOKEN configured and the token owner must have admin access in the repository.

Credits

Developed by @dansysanalyst

Illustration by storyset