3 Commits

Author SHA1 Message Date
Dave Gallant
7b17831900 Update README.md 2023-12-09 08:54:47 -05:00
Dave Gallant
0a7196636b Update README.md 2023-12-09 00:28:36 -05:00
Dave Gallant
c47fc6fc84 Update README.md 2023-12-09 00:26:31 -05:00

View File

@@ -28,8 +28,8 @@ poetry run python rfd_notify/cli.py -c examples/config.yml
The following environment variables are required:
| VARIABLE | DESCRIPTION |
| ----------- | ---------------------------------------------------------------------------------------- |
| VARIABLE | DESCRIPTION |
| ----------- | ---------------------------------------------------------------- |
| APPRISE_URL | See [notifications](https://github.com/caronc/apprise#productivity-based-notifications). |
## Example Configuration
@@ -46,8 +46,6 @@ expressions:
## Github Actions (and Gitea Actions)
> Commiting the pickled data (previous_matches) back into the repository is a bit of a hack, but allows for a simpler setup.
An action can be setup to scan for deals, send a notification and store previously found deals in the repo.
It also requires the corresponding [encrypted secrets](https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets) setup.
@@ -56,6 +54,7 @@ It also requires the corresponding [encrypted secrets](https://docs.github.com/e
# .github/workflows/rfd-notify.yml
on:
push:
schedule:
- cron: "*/5 * * * *"
jobs:
@@ -63,18 +62,25 @@ jobs:
name: rfd-notify
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
sparse-checkout: |
config.yml
previous_matches
- name: Commit and push changes
run: |
git config --local user.email "bot@gitea.snake-cloud.ts.net"
git config --local user.name "RFD Notify"
git add previous_matches
git commit -m "Update previous_matches" -a || true
git push
fetch-depth: 0
- uses: actions/cache@v3
id: cache
with:
path: previous_matches
key: previous-matches
- name: Run rfd-notify
uses: davegallant/rfd-notify@main
env:
APPRISE_URL: ${{ secrets.APPRISE_URL }}
- name: update cache on every commit
uses: actions/cache@v3
with:
path: previous_matches
key: previous-matches-${{ runner.os }}-${{ gitea.run_id }} # Can use time based key as well
restore-keys: |
previous-matches
```
## Gitlab Pipelines
@@ -97,4 +103,5 @@ run:
- previous_matches
script:
- python /app/rfd_notify/cli.py -c config.yml
```