Add ghostbike bot as action
This commit is contained in:
parent
9e69adb2a5
commit
0c8c41c6d4
2 changed files with 48 additions and 0 deletions
24
.forgejo/workflows/config/config_ghost-bikes.json
Normal file
24
.forgejo/workflows/config/config_ghost-bikes.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"cacheDir": "./cache",
|
||||
"mastodonAuth": {
|
||||
"url": "https://masto.bike/",
|
||||
"dryrun": false,
|
||||
"timeout": 60000
|
||||
},
|
||||
"actions": [
|
||||
|
||||
{
|
||||
"contentWarning": "Ghost bikes",
|
||||
"poiName": "ghost bike",
|
||||
"poisName": "ghost bikes",
|
||||
"report": {
|
||||
"overpassQuery": "nwr[%22memorial%22=%22ghost_bike%22];",
|
||||
"post": "As of {date}, #OpenStreetMap contained information about {total} #ghostBikes.\n\nA #ghostBike is a memorial in the form of a #bicycle painted white.\nIt remembers a cyclist that has been killed by a car and is located near the place of the accident.\n\nOpenStreetMap is a world-wide map that everyone can edit and reuse for free. https://mapcomplete.org/ghostbikes is an editable map based on OpenStreetMap with ghostbikes."
|
||||
},
|
||||
"themeWhitelist": ["ghostbikes"],
|
||||
"numberOfDays": 31,
|
||||
"showTopContributors": true,
|
||||
"showThankYou": false
|
||||
}
|
||||
]
|
||||
}
|
24
.forgejo/workflows/ghostbikebot_masto_bike.yml
Normal file
24
.forgejo/workflows/ghostbikebot_masto_bike.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
on:
|
||||
schedule:
|
||||
- cron: "0 2 * * 1"
|
||||
|
||||
jobs:
|
||||
ghostbikebot_masto_bike:
|
||||
runs-on: [ ubuntu-latest ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: "npm"
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- name: install deps
|
||||
run: npm ci
|
||||
shell: bash
|
||||
|
||||
- name: Create ghostbike overview
|
||||
shell: bash
|
||||
run: npm run start -- ./.forgejo/workflows/config/config_ghost-bikes.json ${{ secrets.GHOSTBIKEBOT_MASTO_BIKE }}
|
Loading…
Add table
Add a link
Reference in a new issue