mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
remove defunct automation
This commit is contained in:
parent
d5fe043d76
commit
c1165e9788
2 changed files with 0 additions and 47 deletions
41
.github/scripts/map-projects-to-githubs.ts
vendored
41
.github/scripts/map-projects-to-githubs.ts
vendored
|
@ -1,41 +0,0 @@
|
|||
#!/usr/bin/env tea
|
||||
|
||||
/*---
|
||||
args:
|
||||
- deno
|
||||
- run
|
||||
- --allow-read
|
||||
- --allow-env
|
||||
- --allow-net
|
||||
---*/
|
||||
|
||||
import { usePantry } from "hooks"
|
||||
import { panic } from "utils"
|
||||
import * as semver from "semver"
|
||||
|
||||
const url = Deno.env.get("WATCHER_URL") ?? panic("missing $WATCHER_URL")
|
||||
const token = Deno.env.get("TEA_API_TOKEN") ?? panic("missing $TEA_API_TOKEN")
|
||||
|
||||
const pantry = usePantry()
|
||||
|
||||
const rv: Set<{project: string, github: string}> = new Set()
|
||||
|
||||
for await (const {project} of pantry.ls()) {
|
||||
const yml = await pantry.getYAML({project, constraint: new semver.Range('*') }).parse()
|
||||
if (yml?.versions?.github) {
|
||||
const github = yml.versions.github.split('/').slice(0, 2).join('/')
|
||||
rv.add({ project, github })
|
||||
}
|
||||
}
|
||||
|
||||
const options = {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': `bearer ${token}`,
|
||||
},
|
||||
body: JSON.stringify([...rv]),
|
||||
}
|
||||
|
||||
console.log(rv)
|
||||
await fetch(url, options)
|
6
.github/workflows/cd.yml
vendored
6
.github/workflows/cd.yml
vendored
|
@ -15,12 +15,6 @@ jobs:
|
|||
|
||||
- uses: teaxyz/brewkit/actions/setup-brewkit@v0
|
||||
|
||||
# TODO: convert to teaxyz/brewkit/actions/map-projects-to-githubs
|
||||
- run: .github/scripts/map-projects-to-githubs.ts
|
||||
env:
|
||||
WATCHER_URL: ${{ secrets.WATCHER_URL }}
|
||||
TEA_API_TOKEN: ${{ secrets.TEA_API_TOKEN }}
|
||||
|
||||
- uses: teaxyz/brewkit/actions/has-artifacts@v0
|
||||
id: has-artifacts
|
||||
with:
|
||||
|
|
Loading…
Reference in a new issue