mirror of
https://github.com/davegallant/rfd-notify.git
synced 2025-08-13 19:50:20 +00:00
Compare commits
2 Commits
7b17831900
...
12e2b39dcd
Author | SHA1 | Date | |
---|---|---|---|
|
12e2b39dcd | ||
|
e60fcf2a53 |
35
README.md
35
README.md
@@ -29,7 +29,7 @@ poetry run python rfd_notify/cli.py -c examples/config.yml
|
||||
The following environment variables are required:
|
||||
|
||||
| VARIABLE | DESCRIPTION |
|
||||
| ----------- | ---------------------------------------------------------------- |
|
||||
| ----------- | ---------------------------------------------------------------------------------------- |
|
||||
| APPRISE_URL | See [notifications](https://github.com/caronc/apprise#productivity-based-notifications). |
|
||||
|
||||
## Example Configuration
|
||||
@@ -46,6 +46,8 @@ 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.
|
||||
@@ -54,7 +56,6 @@ It also requires the corresponding [encrypted secrets](https://docs.github.com/e
|
||||
# .github/workflows/rfd-notify.yml
|
||||
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: "*/5 * * * *"
|
||||
jobs:
|
||||
@@ -62,25 +63,18 @@ jobs:
|
||||
name: rfd-notify
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
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
|
||||
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
|
||||
```
|
||||
|
||||
## Gitlab Pipelines
|
||||
@@ -103,5 +97,4 @@ run:
|
||||
- previous_matches
|
||||
script:
|
||||
- python /app/rfd_notify/cli.py -c config.yml
|
||||
|
||||
```
|
||||
|
Reference in New Issue
Block a user