diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 2edc3eca..66775550 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -8,25 +8,36 @@ jobs: cd: runs-on: ubuntu-latest outputs: - HAS_SECRETS: ${{ secrets.AWS_S3_CACHE != '' }} + HAS_ARTIFACTS: ${{ env.HAS_ARTIFACTS }} steps: - uses: actions/checkout@v3 - - run: > - grep -E ' github: [^\w]+/[^\w/]+' projects/**/package.yml | - sed -e 's|^projects/\(.*\)/package.yml: *github: \([^/]*/[^/]*\).*|{ "project": "\1", "github": "\2" }|' | - jq -sc . | - curl https://app.tea.xyz/api/receiveWatcherProjects --fail -X PUT \ - -H "content-type: application/json" -H "authorization: bearer ${{ secrets.TEA_API_TOKEN }}" -d @- + - uses: teaxyz/setup@v0 + - uses: actions/checkout@v3 + name: co core + with: + path: pantry.core + repository: teaxyz/pantry.core + - run: ./scripts/map-projects-to-githubs.ts + working-directory: pantry.core + env: + WATCHER_URL: ${{ secrets.WATCHER_URL }} + TEA_API_TOKEN: ${{ secrets.TEA_API_TOKEN }} + - run: ./scripts/has-artifacts.ts ${{ github.repository }} ${{ github.sha }} >>$GITHUB_ENV + working-directory: pantry.core + env: + GITHUB_TOKEN: ${{github.token}} + AWS_S3_CACHE: ${{ secrets.AWS_S3_CACHE }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} bottle-pr: needs: [cd] - #FIXME: will fail (harmlessly) on non-merge/non-new-version runs, and won't work on 3rd-party PRs - if: ${{ needs.cd.outputs.HAS_SECRETS }} + if: ${{ needs.cd.outputs.HAS_ARTIFACTS == 'true' }} uses: teaxyz/pantry.core/.github/workflows/bottle.yml@main secrets: inherit bottle-standalone: runs-on: ubuntu-latest needs: [cd] - if: ${{ ! needs.cd.outputs.HAS_SECRETS }} + if: ${{ needs.cd.outputs.HAS_ARTIFACTS == 'false' }} steps: - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6 diff --git a/projects/cli.github.com/package.yml b/projects/cli.github.com/package.yml index f3fe8e63..297223be 100644 --- a/projects/cli.github.com/package.yml +++ b/projects/cli.github.com/package.yml @@ -4,6 +4,7 @@ distributable: versions: github: cli/cli/tags + ignore: /-pre\./ provides: - bin/gh diff --git a/projects/github.com/jart/blink/package.yml b/projects/github.com/jart/blink/package.yml new file mode 100644 index 00000000..75f8017d --- /dev/null +++ b/projects/github.com/jart/blink/package.yml @@ -0,0 +1,32 @@ +distributable: + # url: https://github.com/jart/blink/archive/refs/tags/{{version}}.tar.gz currently no tags/releases + url: https://github.com/jart/blink/archive/13df12124d69aba8a7f74803715af36ed629b349.tar.gz + strip-components: 1 + +provides: + - bin/blink + - bin/blinkenlights + +versions: + # github: jart/blink/tags FIXME once they start tagging/releasing + - 0.0.0 + +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + script: | + make -j {{hw.concurrency}} + mkdir {{prefix}}/bin + cp o/blink/blink{,enlights} {{prefix}}/bin + test: | + make check + make check2 + make emulates + +test: + dependencies: + curl.se: '*' + script: | + curl -O https://raw.githubusercontent.com/jart/blink/13df12124d69aba8a7f74803715af36ed629b349/third_party/cosmo/tinyhello.elf + blink tinyhello.elf \ No newline at end of file diff --git a/projects/r-wos.org/gti/package.yml b/projects/r-wos.org/gti/package.yml new file mode 100644 index 00000000..16d31685 --- /dev/null +++ b/projects/r-wos.org/gti/package.yml @@ -0,0 +1,24 @@ +distributable: + url: https://github.com/rwos/gti/archive/v{{version}}.tar.gz + strip-components: 1 + +versions: + github: rwos/gti/tags + +provides: + - bin/gti + +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + script: | + make + mkdir "{{prefix}}"/bin + mv gti "{{prefix}}"/bin + +test: + dependencies: + git-scm.org: ^2 + script: + gti init