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: The following environment variables are required:
| VARIABLE | DESCRIPTION | | VARIABLE | DESCRIPTION |
| ----------- | ---------------------------------------------------------------------------------------- | | ----------- | ---------------------------------------------------------------- |
| APPRISE_URL | See [notifications](https://github.com/caronc/apprise#productivity-based-notifications). | | APPRISE_URL | See [notifications](https://github.com/caronc/apprise#productivity-based-notifications). |
## Example Configuration ## Example Configuration
@@ -46,8 +46,6 @@ expressions:
## Github Actions (and Gitea Actions) ## 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. 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. 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 # .github/workflows/rfd-notify.yml
on: on:
push:
schedule: schedule:
- cron: "*/5 * * * *" - cron: "*/5 * * * *"
jobs: jobs:
@@ -63,18 +62,25 @@ jobs:
name: rfd-notify name: rfd-notify
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v3
with: with:
sparse-checkout: | fetch-depth: 0
config.yml - uses: actions/cache@v3
previous_matches id: cache
- name: Commit and push changes with:
run: | path: previous_matches
git config --local user.email "bot@gitea.snake-cloud.ts.net" key: previous-matches
git config --local user.name "RFD Notify" - name: Run rfd-notify
git add previous_matches uses: davegallant/rfd-notify@main
git commit -m "Update previous_matches" -a || true env:
git push 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 ## Gitlab Pipelines
@@ -97,4 +103,5 @@ run:
- previous_matches - previous_matches
script: script:
- python /app/rfd_notify/cli.py -c config.yml - python /app/rfd_notify/cli.py -c config.yml
``` ```