Skip to content

trustfractal/aws-s3-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS S3 Cleaner task

Runs a cleanup process for S3 bucket.

Usage

- name: Get date 30 days ago for S3 cleanup 
  id: date
  run: echo "::set-output name=date::$(date -d '30 days ago' +'%Y-%m-%d')"

- name: Run cleanup
  uses: trustfractal/aws-s3-cleaner@v1.0
  with:
    bucket: my-bucket
    include: |
      src/**/*.js
      locale/**/*.po
    exclude: |
      vendor/*
    older_than: ${{steps.date.outputs.date}}

See action.yml file for the full documentation of this action's inputs and outputs.

For matching, we are using wildcard-match npm package.

License Summary

This code is made available under the MIT license.