From c6a83d1e63e317db2d66fe6b20e57cbda61ae791 Mon Sep 17 00:00:00 2001 From: Jorge Escobar <83969469+esfoobar-usds@users.noreply.github.com> Date: Thu, 17 Feb 2022 13:59:46 -0500 Subject: [PATCH] close pr be gha --- .github/workflows/closed_be_pr.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/closed_be_pr.yml diff --git a/.github/workflows/closed_be_pr.yml b/.github/workflows/closed_be_pr.yml new file mode 100644 index 00000000..e6a89d16 --- /dev/null +++ b/.github/workflows/closed_be_pr.yml @@ -0,0 +1,20 @@ +name: Closed Backend PR +on: + pull_request: + types: [closed] + paths: + - "data/**" +env: + PR_NUMBER: ${{github.event.pull_request.number}} +jobs: + remove-artifacts: + runs-on: ubuntu-latest + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.CLIENT_DEV_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.CLIENT_DEV_AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + - name: Remove staging artifacts + run: aws s3 rm s3://justice40-data/data-pipeline-staging/ --exclude "*" --include "$(echo $PR_NUMBER)-*" --recursive