Compare commits

...

2 commits

Author SHA1 Message Date
a90dff4b4c mejorar ci
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-07-17 16:36:55 -03:00
58181255b2 bajar todos los feeds al mismo tiempo 2023-07-17 16:33:40 -03:00
2 changed files with 24 additions and 8 deletions

View file

@ -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 -

View file

@ -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);
}
})
);
}
/**