Compare commits
No commits in common. "a90dff4b4c37e1706034f2643320cbedb30229a6" and "1a0f50093b2a267f47d72e4439502e30d9878dbc" have entirely different histories.
a90dff4b4c
...
1a0f50093b
2 changed files with 11 additions and 27 deletions
|
@ -1,26 +1,12 @@
|
|||
pipeline:
|
||||
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:
|
||||
- pnpm install
|
||||
- ./tool check
|
||||
- ./tool refresh_feeds
|
||||
- ./tool build
|
||||
|
||||
- |
|
||||
eval $(ssh-agent -s)
|
||||
echo "$${SSH_KEY}" | tr -d '\r' | ssh-add -
|
||||
|
|
6
feeds.js
6
feeds.js
|
@ -10,14 +10,12 @@ export const feeds = {
|
|||
};
|
||||
|
||||
if (process.argv[2] === "refresh") {
|
||||
await Promise.all(
|
||||
Object.entries(feeds).map(async ([name, url]) => {
|
||||
for (const [name, url] of Object.entries(feeds)) {
|
||||
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