📝 docs(README): update configuration and remove CI section
All checks were successful
build-and-push / docker (push) Successful in 1m8s
All checks were successful
build-and-push / docker (push) Successful in 1m8s
- remove outdated CI/build instructions
- add new environment variable options for configuration
🐛 fix(util): handle notification errors gracefully
- resolve promise instead of rejecting on notification errors
- prevent whole run from failing due to notification issues
This commit is contained in:
parent
0a729d0cbf
commit
9d79f9ac78
2 changed files with 9 additions and 10 deletions
16
README.md
16
README.md
|
|
@ -50,15 +50,6 @@ volumes:
|
||||||
fgc:
|
fgc:
|
||||||
```
|
```
|
||||||
|
|
||||||
CI / Build Your Own Image
|
|
||||||
-------------------------
|
|
||||||
- Workflow: `.forgejo/workflows/build.yml` builds/pushes on `push` to `main`.
|
|
||||||
- Secrets needed in Forgejo:
|
|
||||||
- `REGISTRY` (e.g., `git.sky-net.it`)
|
|
||||||
- `REGISTRY_IMAGE` (e.g., `git.sky-net.it/nocci/free-games-claimer`)
|
|
||||||
- `REG_USER`, `REG_TOKEN` (PAT with package push)
|
|
||||||
- Requires a self-hosted runner with Docker access (`runs-on: self-hosted`).
|
|
||||||
|
|
||||||
Configuration (Environment Variables)
|
Configuration (Environment Variables)
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
Common options:
|
Common options:
|
||||||
|
|
@ -69,6 +60,13 @@ Common options:
|
||||||
- Prime Gaming: `PG_REDEEM=1` (auto-redeem keys, experimental), `PG_CLAIMDLC=1`, `PG_TIMELEFT=<days>` to skip long-remaining offers
|
- Prime Gaming: `PG_REDEEM=1` (auto-redeem keys, experimental), `PG_CLAIMDLC=1`, `PG_TIMELEFT=<days>` to skip long-remaining offers
|
||||||
- Screenshots: `SCREENSHOTS_DIR` (default `data/screenshots`)
|
- Screenshots: `SCREENSHOTS_DIR` (default `data/screenshots`)
|
||||||
- Notifications: `NOTIFY='...'` (Apprise URL), optional `NOTIFY_TITLE`
|
- Notifications: `NOTIFY='...'` (Apprise URL), optional `NOTIFY_TITLE`
|
||||||
|
- Browser profile: `BROWSER_DIR` (default `data/browser`)
|
||||||
|
- Recording: `RECORD=1` to save videos/HAR to `data/record/`
|
||||||
|
- Debugging: `DEBUG=1` (opens Playwright inspector), `DEBUG_NETWORK=1` (logs requests), `TIME=1` (prints timings)
|
||||||
|
- Dry run / Interaction: `DRYRUN=1` (do not claim), `INTERACTIVE=1` (ask before claiming), `HEADLESS` is derived from `SHOW`/`DEBUG`
|
||||||
|
- Directories: `SCREENSHOTS_DIR`, `BROWSER_DIR`, `DATA_DIR` (prefix for data; default under `data/`)
|
||||||
|
- VNC/noVNC: `VNC_PASSWORD` (for Docker entrypoint), `NOVNC_PORT`/`VNC_PORT` (Docker)
|
||||||
|
- General timeouts: `TIMEOUT` (per action), `LOGIN_TIMEOUT` (extra time for login)
|
||||||
|
|
||||||
You can place a `data/config.env`; it is loaded via dotenv and is overridden by explicitly set environment variables.
|
You can place a `data/config.env`; it is loaded via dotenv and is overridden by explicitly set environment variables.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,8 @@ export const notify = html => new Promise((resolve, reject) => {
|
||||||
if (error.message.includes('command not found')) {
|
if (error.message.includes('command not found')) {
|
||||||
console.info('Run `pip install apprise`. See https://github.com/vogler/free-games-claimer#notifications');
|
console.info('Run `pip install apprise`. See https://github.com/vogler/free-games-claimer#notifications');
|
||||||
}
|
}
|
||||||
return reject(error);
|
// don't fail the whole run on notification errors
|
||||||
|
return resolve();
|
||||||
}
|
}
|
||||||
if (stderr) console.error(`stderr: ${stderr}`);
|
if (stderr) console.error(`stderr: ${stderr}`);
|
||||||
if (stdout) console.log(`stdout: ${stdout}`);
|
if (stdout) console.log(`stdout: ${stdout}`);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue