mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
we're cleaning up artifact staging too aggressively
This commit is contained in:
parent
53399afa73
commit
6120e674ee
2 changed files with 29 additions and 24 deletions
28
.github/workflows/bottle.yml
vendored
28
.github/workflows/bottle.yml
vendored
|
@ -10,6 +10,10 @@ on:
|
|||
platform:
|
||||
required: true
|
||||
type: string
|
||||
outputs:
|
||||
pr:
|
||||
description: 'The PR number'
|
||||
value: ${{ jobs.bottle.outputs.pr }}
|
||||
|
||||
jobs:
|
||||
get-platform:
|
||||
|
@ -214,30 +218,6 @@ jobs:
|
|||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [bottle, upload]
|
||||
if: ${{ !inputs.new-version }}
|
||||
steps:
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-1
|
||||
- run: |
|
||||
REPO=$(echo ${{github.repository}} | sed -e 's_teaxyz/__')
|
||||
|
||||
if test -z "$PR"; then
|
||||
echo "no PR to clean up"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
aws s3 rm --recursive s3://$AWS_S3_CACHE/pull-request/$REPO/$PR
|
||||
env:
|
||||
AWS_S3_CACHE: ${{ secrets.AWS_S3_CACHE }}
|
||||
PR: ${{ needs.bottle.outputs.pr }}
|
||||
|
||||
complain:
|
||||
needs: [upload]
|
||||
if: inputs.new-version == 'true' && failure()
|
||||
|
|
25
.github/workflows/cd.yml
vendored
25
.github/workflows/cd.yml
vendored
|
@ -42,6 +42,31 @@ jobs:
|
|||
with:
|
||||
platform: ${{ matrix.platform }}
|
||||
secrets: inherit
|
||||
cleanup:
|
||||
needs: [bottle-pr]
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ needs.cd.outputs.HAS_ARTIFACTS == 'true' }}
|
||||
env:
|
||||
PR: ${{ needs.bottle.outputs.pr }}
|
||||
steps:
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-1
|
||||
- run: |
|
||||
REPO=$(echo ${{github.repository}} | sed -e 's_teaxyz/__')
|
||||
|
||||
if test -z "$PR"; then
|
||||
echo "no PR to clean up"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
aws s3 rm --recursive s3://$AWS_S3_CACHE/pull-request/$REPO/$PR
|
||||
env:
|
||||
AWS_S3_CACHE: ${{ secrets.AWS_S3_CACHE }}
|
||||
PR: ${{ needs.bottle.outputs.pr }}
|
||||
bottle-standalone:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [cd]
|
||||
|
|
Loading…
Reference in a new issue