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

View file

@ -31,7 +31,7 @@ jobs:
runs-on: ${{ fromJson(needs.get-platform.outputs.build-os) }}
container: ${{ fromJson(needs.get-platform.outputs.container) }}
needs: [get-platform]
if: ${{ needs.get-platform.outputs.available == 'true' }}
if: ${{ needs.get-platform.outputs.available != '' }}
steps:
- uses: actions/checkout@v3
@ -51,7 +51,7 @@ jobs:
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE_P12 }}
p12-password: ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }}
- run: pkg build ${{ inputs.projects }}
- run: pkg build ${{ needs.get-platform.outputs.available }}
id: build
env:
GITHUB_TOKEN: ${{ github.token }}
@ -93,7 +93,7 @@ jobs:
test:
needs: [get-platform, build]
if: ${{ needs.get-platform.outputs.available == 'true' }}
if: ${{ needs.get-platform.outputs.available != '' }}
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
@ -129,7 +129,7 @@ jobs:
- name: extract bottles
run: tar xzvf artifacts.tgz -C $TEA_PREFIX
- run: pkg test ${{ inputs.projects }}
- run: pkg test ${{ needs.get-platform.outputs.available }}
env:
GITHUB_TOKEN: ${{ github.token }}
# FIXME: this shouldn't be necessary, but it currently is for the
@ -145,7 +145,7 @@ jobs:
stage:
needs: [get-platform, test]
# 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
steps:
- uses: actions/download-artifact@v3