From de334b530237e897a944e931f017830e85c8b916 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Fri, 15 Sep 2023 21:53:02 +0300 Subject: [PATCH] Update CONTRIBUTING.md --- CONTRIBUTING.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8444f3849f..97117cace7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,7 @@ - [Stream Description Scheme](#stream-description-scheme) - [Project Structure](#project-structure) - [Scripts](#scripts) +- [Workflows](#workflows) ## How to? @@ -115,6 +116,8 @@ http://example.com/stream.m3u8 ## Scripts +These scripts are created to automate routine processes in the repository and make it a bit easier to maintain. + For scripts to work, you must have [Node.js](https://nodejs.org/en) installed on your computer. To run scripts use the `npm run ` command. @@ -125,7 +128,7 @@ To run scripts use the `npm run ` command. - `api:generate`: generates a JSON file with all streams for the [iptv-org/api](https://github.com/iptv-org/api) repository. - `api:deploy`: allows to manually upload a JSON file created via `api:generate` to the [iptv-org/api](https://github.com/iptv-org/api) repository. To run the script you must provide your [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with write access to the repository. - `db:create`: сreates a temporary file `temp/database/streams.db` containing all links from the [/streams]() folder. -- `playlist:update`: triggers an update of internal playlists. The process involves processing requests from issues, URL normalization, and sorting links by channel name, quality, and label. +- `playlist:update`: triggers an update of internal playlists. The process involves processing approved requests from issues, URL normalization, and sorting links by channel name, quality, and label. - `playlist:validate`: сhecks ids and links in internal playlists for errors. - `playlist:lint`: сhecks internal playlists for syntax errors. - `playlist:generate`: generates all public playlists. @@ -138,3 +141,12 @@ To run scripts use the `npm run ` command. - `deploy`: (shorthand) sequentially runs the `playlist:deploy` and `api:deploy` commands. - `report`: (shorthand) sequentially runs the `api:load` and `report:create` commands. - `test`: runs a test of all the scripts described above. + +## Workflows + +To automate the run of the scripts described above, we use the [GitHub Actions workflows](https://docs.github.com/en/actions/using-workflows). + +Each workflow includes its own set of scripts that can be run either manually or in response to an event. + +- `check`: sequentially runs the `playlist:check` and `playlist:validate` scripts when a new pull request appears, and blocks the merge if it detects an error in it. +- `update`: every day at 0:00 UTC sequentially runs `api:load`, `db:create`, `playlist:update`, `playlist:lint`, `playlist:validate`, `playlist:generate`, `api:generate` and `readme:update` scripts and deploys the output files if successful.