Delete feature branch from S3 #1094
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Delete feature branch from S3 | |
on: delete | |
jobs: | |
cleanup: | |
runs-on: ubuntu-latest | |
if: github.event.ref_type == 'branch' && startsWith(github.event.ref, 'feature-') == true | |
steps: | |
- name: Inject slug/short variables | |
uses: rlespinasse/[email protected] | |
- name: Remove from S3 | |
uses: vitorsgomes/s3-rm-action@master | |
with: | |
args: --recursive | |
env: | |
# Update this according to the name of your S3 bucket. | |
AWS_S3_BUCKET: uk-sdg-feature-branches | |
# Don't forget to set AWS_ACCESS as a "repository secret". | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS }} | |
# Don't forget to set AWS_SECRET as a "repository secret". | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET }} | |
PATH_TO_DELETE: ${{ env.GITHUB_EVENT_REF_SLUG }} |