From a3d3bc654eb9d296e585972bf0f9476abb21d8e4 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 29 Dec 2023 08:28:03 +0000 Subject: [PATCH] Fix restock again --- .github/scripts/inventory.ts | 8 +++++++- .github/workflows/ci-squared.yml | 2 +- .github/workflows/librarian.yml | 2 +- .github/workflows/restock.yml | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/scripts/inventory.ts b/.github/scripts/inventory.ts index 4e08b4d3..73838cc0 100755 --- a/.github/scripts/inventory.ts +++ b/.github/scripts/inventory.ts @@ -14,4 +14,10 @@ for (const platform of ["linux", "darwin"]) { versions = [...new Set(versions.filter(x => x.trim()))] -console.log(JSON.stringify(versions)) +const ghout = Deno.env.get("GITHUB_OUTPUT") +if (ghout) { + const json = JSON.stringify(versions) + Deno.writeTextFileSync(ghout, `versions=${json}`, {append: true}) +} else { + console.log(JSON.stringify(versions)) +} diff --git a/.github/workflows/ci-squared.yml b/.github/workflows/ci-squared.yml index bdc60ea9..1a753dcb 100644 --- a/.github/workflows/ci-squared.yml +++ b/.github/workflows/ci-squared.yml @@ -1,4 +1,4 @@ -name: ci-squared +name: ci² run-name: ci² on: diff --git a/.github/workflows/librarian.yml b/.github/workflows/librarian.yml index f6bb34ae..5bf42ab0 100644 --- a/.github/workflows/librarian.yml +++ b/.github/workflows/librarian.yml @@ -1,6 +1,6 @@ # cleans up our issues based on tags applied -name: librarian +name: library bot run-name: "handling #${{ github.event.issue.number }}: ${{ github.event.issue.title }}" on: diff --git a/.github/workflows/restock.yml b/.github/workflows/restock.yml index bdb30835..a2a64cae 100644 --- a/.github/workflows/restock.yml +++ b/.github/workflows/restock.yml @@ -13,12 +13,12 @@ jobs: ingest: runs-on: ubuntu-latest outputs: - versions: ${{ steps.fetch.outputs.plan }} + versions: ${{ steps.inventory.outputs.versions }} steps: - uses: pkgxdev/setup@v2 - uses: actions/checkout@v4 - run: ./.github/scripts/inventory.ts ${{ inputs.project }} - id: fetch + id: inventory pkg: needs: ingest