mirror of
https://github.com/KevinMidboe/miljobilen-rss.git
synced 2025-10-29 09:40:22 +00:00
Merge pull request #1 from KevinMidboe/ci/test
Setup CI to generate and upload to gcloud
This commit is contained in:
25
.github/workflows/update-rss.yml
vendored
25
.github/workflows/update-rss.yml
vendored
@@ -9,20 +9,33 @@ on:
|
||||
- cron: "0 0 * * *" # Run every day at midnight
|
||||
|
||||
jobs:
|
||||
build:
|
||||
generate-rss:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: 'read'
|
||||
id-token: 'write'
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '21'
|
||||
|
||||
- name: Run Script
|
||||
run: node run.js
|
||||
run: node src/run.js
|
||||
|
||||
- name: List Directory
|
||||
run: ls -l
|
||||
- id: 'auth-to-gcloud'
|
||||
uses: 'google-github-actions/auth@v2'
|
||||
with:
|
||||
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
|
||||
|
||||
- id: 'upload-rss-file'
|
||||
uses: 'google-github-actions/upload-cloud-storage@v2'
|
||||
with:
|
||||
path: 'rss.xml'
|
||||
destination: 'miljobilen-rss'
|
||||
process_gcloudignore: false
|
||||
|
||||
@@ -13,8 +13,10 @@ Runs every day and checks for and updates RSS with next pickup date relative to
|
||||
This is such a shitshow.
|
||||
|
||||
Smaller tasks:
|
||||
- [ ] Connect to Google bucket, SA, etc.
|
||||
- [x] Connect to Google bucket, SA, etc.
|
||||
- [ ] Updates RSS generation
|
||||
- [ ] Compare existing dates in RSS to fetched
|
||||
- [ ] alert on failing run
|
||||
|
||||
### Handle rollover of date list
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ class RSS {
|
||||
this.filename = 'rss.xml';
|
||||
this.feed = null;
|
||||
|
||||
this.read()
|
||||
// this.read()
|
||||
}
|
||||
|
||||
// reads RSS file
|
||||
Reference in New Issue
Block a user