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
|
- cron: "0 0 * * *" # Run every day at midnight
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
generate-rss:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: 'read'
|
||||||
|
id-token: 'write'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '21'
|
node-version: '21'
|
||||||
|
|
||||||
- name: Run Script
|
- name: Run Script
|
||||||
run: node run.js
|
run: node src/run.js
|
||||||
|
|
||||||
- name: List Directory
|
- id: 'auth-to-gcloud'
|
||||||
run: ls -l
|
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.
|
This is such a shitshow.
|
||||||
|
|
||||||
Smaller tasks:
|
Smaller tasks:
|
||||||
- [ ] Connect to Google bucket, SA, etc.
|
- [x] Connect to Google bucket, SA, etc.
|
||||||
- [ ] Updates RSS generation
|
- [ ] Updates RSS generation
|
||||||
|
- [ ] Compare existing dates in RSS to fetched
|
||||||
|
- [ ] alert on failing run
|
||||||
|
|
||||||
### Handle rollover of date list
|
### Handle rollover of date list
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class RSS {
|
|||||||
this.filename = 'rss.xml';
|
this.filename = 'rss.xml';
|
||||||
this.feed = null;
|
this.feed = null;
|
||||||
|
|
||||||
this.read()
|
// this.read()
|
||||||
}
|
}
|
||||||
|
|
||||||
// reads RSS file
|
// reads RSS file
|
||||||
Reference in New Issue
Block a user