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:
|
pipeline:
|
||||||
upload:
|
setup:
|
||||||
image: gitea.nulo.in/nulo/super-image:3.18
|
image: gitea.nulo.in/nulo/super-image:3.18
|
||||||
commands:
|
commands:
|
||||||
- pnpm install
|
- pnpm install
|
||||||
|
check:
|
||||||
|
image: gitea.nulo.in/nulo/super-image:3.18
|
||||||
|
commands:
|
||||||
- ./tool check
|
- ./tool check
|
||||||
|
when:
|
||||||
|
path:
|
||||||
|
exclude: ["*.md"]
|
||||||
|
refresh-feeds:
|
||||||
|
image: gitea.nulo.in/nulo/super-image:3.18
|
||||||
|
commands:
|
||||||
- ./tool refresh_feeds
|
- ./tool refresh_feeds
|
||||||
|
build:
|
||||||
|
image: gitea.nulo.in/nulo/super-image:3.18
|
||||||
|
commands:
|
||||||
- ./tool build
|
- ./tool build
|
||||||
|
upload:
|
||||||
|
image: gitea.nulo.in/nulo/super-image:3.18
|
||||||
|
commands:
|
||||||
- |
|
- |
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
echo "$${SSH_KEY}" | tr -d '\r' | ssh-add -
|
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") {
|
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}`);
|
console.log(`Refreshing ${name}`);
|
||||||
const res = await fetch(url);
|
const res = await fetch(url);
|
||||||
const txt = await res.text();
|
const txt = await res.text();
|
||||||
await writeFile(join("cached-feeds/", `${name}.xml`), txt);
|
await writeFile(join("cached-feeds/", `${name}.xml`), txt);
|
||||||
}
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Reference in a new issue