mirror of
https://github.com/ivabus/pantry
synced 2024-11-27 02:35:08 +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:
|
cd:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
HAS_SECRETS: ${{ secrets.AWS_S3_CACHE != '' }}
|
HAS_ARTIFACTS: ${{ env.HAS_ARTIFACTS }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- run: >
|
- run: >
|
||||||
|
@ -17,16 +17,28 @@ jobs:
|
||||||
jq -sc . |
|
jq -sc . |
|
||||||
curl https://app.tea.xyz/api/receiveWatcherProjects --fail -X PUT \
|
curl https://app.tea.xyz/api/receiveWatcherProjects --fail -X PUT \
|
||||||
-H "content-type: application/json" -H "authorization: bearer ${{ secrets.TEA_API_TOKEN }}" -d @-
|
-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:
|
bottle-pr:
|
||||||
needs: [cd]
|
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_ARTIFACTS == 'true' }}
|
||||||
if: ${{ needs.cd.outputs.HAS_SECRETS }}
|
|
||||||
uses: teaxyz/pantry.core/.github/workflows/bottle.yml@main
|
uses: teaxyz/pantry.core/.github/workflows/bottle.yml@main
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
bottle-standalone:
|
bottle-standalone:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [cd]
|
needs: [cd]
|
||||||
if: ${{ ! needs.cd.outputs.HAS_SECRETS }}
|
if: ${{ needs.cd.outputs.HAS_ARTIFACTS == 'false' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: technote-space/get-diff-action@v6
|
- uses: technote-space/get-diff-action@v6
|
||||||
|
|
Loading…
Reference in a new issue