Compare commits
2 commits
1a0f50093b
...
a90dff4b4c
Author | SHA1 | Date | |
---|---|---|---|
a90dff4b4c | |||
58181255b2 |
2 changed files with 24 additions and 8 deletions
|
@ -1,12 +1,26 @@
|
|||
pipeline:
|
||||
upload:
|
||||
setup:
|
||||
image: gitea.nulo.in/nulo/super-image:3.18
|
||||
commands:
|
||||
- pnpm install
|
||||
check:
|
||||
image: gitea.nulo.in/nulo/super-image:3.18
|
||||
commands:
|
||||
- ./tool check
|
||||
when:
|
||||
path:
|
||||
exclude: ["*.md"]
|
||||
refresh-feeds:
|
||||
image: gitea.nulo.in/nulo/super-image:3.18
|
||||
commands:
|
||||
- ./tool refresh_feeds
|
||||
build:
|
||||
image: gitea.nulo.in/nulo/super-image:3.18
|
||||
commands:
|
||||
- ./tool build
|
||||
|
||||
upload:
|
||||
image: gitea.nulo.in/nulo/super-image:3.18
|
||||
commands:
|
||||
- |
|
||||
eval $(ssh-agent -s)
|
||||
echo "$${SSH_KEY}" | tr -d '\r' | ssh-add -
|
||||
|
|
6
feeds.js
6
feeds.js
|
@ -10,12 +10,14 @@ export const feeds = {
|
|||
};
|
||||
|
||||
if (process.argv[2] === "refresh") {
|
||||
for (const [name, url] of Object.entries(feeds)) {
|
||||
await Promise.all(
|
||||
Object.entries(feeds).map(async ([name, url]) => {
|
||||
console.log(`Refreshing ${name}`);
|
||||
const res = await fetch(url);
|
||||
const txt = await res.text();
|
||||
await writeFile(join("cached-feeds/", `${name}.xml`), txt);
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue