mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
better artifact testing for cd
This commit is contained in:
parent
1ba5ad2291
commit
9b4b042fc3
1 changed files with 16 additions and 4 deletions
20
.github/workflows/cd.yml
vendored
20
.github/workflows/cd.yml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
|||
cd:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
HAS_SECRETS: ${{ secrets.AWS_S3_CACHE != '' }}
|
||||
HAS_ARTIFACTS: ${{ env.HAS_ARTIFACTS }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: >
|
||||
|
@ -17,16 +17,28 @@ jobs:
|
|||
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/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
|
||||
|
|
Loading…
Reference in a new issue