GithubHelp home page GithubHelp logo

cirrusmd / github-action-clean-docker-packages Goto Github PK

View Code? Open in Web Editor NEW
0.0 8.0 0.0 5.97 MB

GitHub Action to clean Docker packages stored in GitHub

License: MIT License

JavaScript 97.96% Dockerfile 2.04%

github-action-clean-docker-packages's Introduction

github-action-clean-docker-packages

This action will clean up the oldest Docker packages hosted on GitHub. This is intended to be run in the GitHub repo where the package exists. This action differs from others in that it aims to try an keep the most recent 100 (or less) packages, as opposed to removing specific versions.

Please read information on the GraphQL query we use to accomplish this here. This mutation is in "preview" as per GitHub docs.

Inputs

gh-token

Required a token which has the ability to remove packages in the repo.

docker-package

Required the name of the docker-package you'd like to remove versions of.

num-keep

Optional the number of most recent images to keep. Default: 100

dry-run

Optional removing packages can be scary so this will show you what we would remove (true/false).

Outputs

packages-cleaned

a list of packages that were cleaned/removed from the repository

Example usage

uses: cirrusmd/[email protected]
with:
  gh-token: ${{ secrets.YOUR_GH_TOKEN_SECRET }}
  docker-package: 'dockerImage'
  dry-run: true # enable dry-run just to test it 

Packaging:

  1. Make any necessary changes to the src/ and test/ directories.
  2. ensure that ncc is installed npm i -g @vercel/ncc
  3. package ncc build src/repoclean.js --license LICENSE
  4. ensure that dist/ is up-to-date

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.