mirror of
https://github.com/davegallant/rfd-notify.git
synced 2025-08-10 10:22:27 +00:00
Update README.md
This commit is contained in:
59
README.md
59
README.md
@@ -44,7 +44,7 @@ expressions:
|
||||
- price error
|
||||
```
|
||||
|
||||
## Github Actions
|
||||
## Github Actions (and Gitea Actions)
|
||||
|
||||
An action can be setup to scan for deals, send a notification and store previously found deals in the repo.
|
||||
|
||||
@@ -69,11 +69,18 @@ jobs:
|
||||
id: cache
|
||||
with:
|
||||
path: previous_matches
|
||||
key: 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
|
||||
@@ -98,51 +105,3 @@ run:
|
||||
- python /app/rfd_notify/cli.py -c config.yml
|
||||
|
||||
```
|
||||
|
||||
## Jenkins
|
||||
|
||||
> The necessary Jenkins plugins (such as docker) and credentials must be configured.
|
||||
|
||||
Using a declarative pipeline, run the build every minute, and store the previous matches in the workspace:
|
||||
|
||||
```groovy
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
triggers {
|
||||
cron('* * * * *')
|
||||
}
|
||||
|
||||
options {
|
||||
buildDiscarder(
|
||||
logRotator(
|
||||
numToKeepStr: '25',
|
||||
artifactNumToKeepStr: '25'
|
||||
)
|
||||
)
|
||||
disableConcurrentBuilds()
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Run rfd-notify') {
|
||||
agent {
|
||||
docker {
|
||||
image 'ghcr.io/davegallant/rfd-notify:1'
|
||||
args '--entrypoint='
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
steps {
|
||||
withCredentials([string(credentialsId: 'apprise-url', variable: 'APPRISE_URL')]) {
|
||||
sh 'python /app/rfd_notify/cli.py -c config.yml'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Archive previous_matches') {
|
||||
steps {
|
||||
archiveArtifacts artifacts: 'previous_matches'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
Reference in New Issue
Block a user