Giter Club home page Giter Club logo

delete-from-s3-action's Introduction

delete-from-s3-action

This is the Github Action that delete object/s from a S3 bucket

Status

GitHub GitHub release (with filter) GitHub contributors

Release

GitHub release (with filter) CI GitHub Super-Linter

Next

GitHub release (with filter) CI GitHub Super-Linter

Develop

GitHub release (with filter) CI GitHub Super-Linter Dependency Review Unit Test Quality Gate Status Reliability Rating Technical Debt Security Rating Bugs

Usage

workflow.yml Example

Place in a .yml file such as this one in your .github/workflows folder. Refer to the documentation on workflow YAML syntax here.

name: Delete from S3

on:
  push:
    branches:
      - master

jobs:
  delete-s3:
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@master
    - uses: 3dwardCh3nG/delete-from-s3-action@v1
      with:
        aws_access_key_id: ${{ secrets.AWS_KEY_ID }}
        aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
        aws_bucket_name: 'my-bucket'
        aws_bucket_region: 'ap-southeast-2'
        object_key_to_delete: 's3/bucket/path/to/delete.txt'

Action inputs

Please follow below to see all the inputs for the action.

name description Default Value
aws_access_key_id (Optional) AWS Access Key ID When empty, it will use value AWS_ACCESS_KEY_ID from the environment variable.
aws_secret_access_key (Optional) AWS Secret Access Key When empty, it will use value AWS_SECRET_ACCESS_KEY from the environment variable.
aws_bucket_name AWS S3 Bucket Name
aws_bucket_region AWS S3 Bucket Region
is_full_match (Optional) The flag of if the input object_key_to_delete value matches the exact object key of the object in the bucket Default value: true
is_any_match (Optional) The flag of if the input object_key_to_delete value matches the any part of the object keys of the objects in the bucket Default value: false
is_prefix_match (Optional) The flag of if the input object_key_to_delete value matches the prefix of the object keys of the objects in the bucket Default value: false
is_suffix_match (Optional) The flag of if the input object_key_to_delete value matches the suffix of the object keys of the objects in the bucket Default value: false
object_key_to_delete the (partial) object key to match the objects in the bucket The (partial) object key you want to use to match the objects in the bucket, matched object will be deleted.
dry_run (Optional) The flag of the Dry Run mode Default value: false. In the dry run mode, it will only display the object keys of the objects will be deleted. No object will be actually deleted.

Logs

In order to enable to debug logs, you need to enable to Step Debug Logs by setting the secret ACTIONS_STEP_DEBUG to true. (see: Step Debug Logs)

License

MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.