have get-platforms partial filter unavailable platforms, instead of dropping (#1739)

* improve get-platforms.ts

* test half filtered

* figured this might be weird

* no undefined, i guess.

* or double quotes

* ready
This commit is contained in:
Jacob Heider 2023-04-29 21:45:57 -04:00 committed by GitHub
parent 42435e8926
commit d0afeaf2f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

@ -34,7 +34,7 @@ jobs:
bottle: bottle:
needs: [get-platform] needs: [get-platform]
if: ${{ needs.get-platform.outputs.available == 'true' }} if: ${{ needs.get-platform.outputs.available != '' }}
runs-on: ${{ fromJson(needs.get-platform.outputs.os) }} runs-on: ${{ fromJson(needs.get-platform.outputs.os) }}
outputs: outputs:
srcs: ${{ env.srcs }} srcs: ${{ env.srcs }}
@ -125,7 +125,7 @@ jobs:
upload: upload:
needs: [get-platform, bottle] needs: [get-platform, bottle]
if: ${{ needs.get-platform.outputs.available == 'true' }} if: ${{ needs.get-platform.outputs.available != '' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: teaxyz/brewkit/actions/setup-brewkit@v0 - uses: teaxyz/brewkit/actions/setup-brewkit@v0

View file

@ -31,7 +31,7 @@ jobs:
runs-on: ${{ fromJson(needs.get-platform.outputs.build-os) }} runs-on: ${{ fromJson(needs.get-platform.outputs.build-os) }}
container: ${{ fromJson(needs.get-platform.outputs.container) }} container: ${{ fromJson(needs.get-platform.outputs.container) }}
needs: [get-platform] needs: [get-platform]
if: ${{ needs.get-platform.outputs.available == 'true' }} if: ${{ needs.get-platform.outputs.available != '' }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -51,7 +51,7 @@ jobs:
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE_P12 }} p12-file-base64: ${{ secrets.APPLE_CERTIFICATE_P12 }}
p12-password: ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }} p12-password: ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }}
- run: pkg build ${{ inputs.projects }} - run: pkg build ${{ needs.get-platform.outputs.available }}
id: build id: build
env: env:
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
@ -93,7 +93,7 @@ jobs:
test: test:
needs: [get-platform, build] needs: [get-platform, build]
if: ${{ needs.get-platform.outputs.available == 'true' }} if: ${{ needs.get-platform.outputs.available != '' }}
runs-on: ${{ matrix.platform.os }} runs-on: ${{ matrix.platform.os }}
strategy: strategy:
matrix: matrix:
@ -129,7 +129,7 @@ jobs:
- name: extract bottles - name: extract bottles
run: tar xzvf artifacts.tgz -C $TEA_PREFIX run: tar xzvf artifacts.tgz -C $TEA_PREFIX
- run: pkg test ${{ inputs.projects }} - run: pkg test ${{ needs.get-platform.outputs.available }}
env: env:
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
# FIXME: this shouldn't be necessary, but it currently is for the # FIXME: this shouldn't be necessary, but it currently is for the
@ -145,7 +145,7 @@ jobs:
stage: stage:
needs: [get-platform, test] needs: [get-platform, test]
# this only works for PRs from our team to our repo (security! :( ) # this only works for PRs from our team to our repo (security! :( )
if: startsWith(github.ref, 'refs/pull/') && github.repository_owner == 'teaxyz' && needs.test.outputs.HAS_SECRETS == 'true' && needs.get-platform.outputs.available == 'true' if: startsWith(github.ref, 'refs/pull/') && github.repository_owner == 'teaxyz' && needs.test.outputs.HAS_SECRETS == 'true' && needs.get-platform.outputs.available != ''
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3