Giter VIP home page Giter VIP logo

dive-action's Introduction

Dive action

The purpose of this action is to run wagoodman/dive on a Docker image and posts the results as a comment on a PR in GitHub. It can also be used in other actions but will echo the JSON output to the CI/CD console instead. Using dive you can see which layers in your Docker image are taking up the most space and which ones are inefficient.

Configuration

The action is configured using environment variables. The following variables are required:

Variable Description
GITHUB_TOKEN The GitHub token to use to post the comment.
IMAGE_NAME The name of the Docker image to run dive on.

The following variables are optional:

Variable Description
DIVE_VERSION The version of dive to use. Defaults to 0.11.0.

Example usage

- name: Dive into docker image
  uses: cds-snc/dive-action@main
  env: 
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    IMAGE_NAME: "alpine:latest"

Just be sure to replace the IMAGE_NAME with the name of the image you want to run dive on. Most likely something you will have built in a previous step.

Example output

Dive image results for alpine:latest

Image alpine:latest
Total Size 7.00MiB
Inefficient Bytes 0.00B
Efficiency Percentage 100.00%
Total Layers 1
Show full output
{
  "layer": [
    {
      "index": 0,
      "id": "b1a086cc7b4e637792beecd0316d55b301c5ac60d5988b0df9897b329616ac37",
      "digestId": "sha256:4693057ce2364720d39e57e85a5b8e0bd9ac3573716237736d6470ec5b7b7230",
      "sizeBytes": 7330497,
      "command": "#(nop) ADD file:32ff5e7a78b890996ee4681cc0a26185d3e9acdb4eb1e2aaccb2411f922fed6b in / "
    }
  ],
  "image": {
    "sizeBytes": 7330497,
    "inefficientBytes": 0,
    "efficiencyScore": 1,
    "fileReference": []
  }
}

dive-action's People

Contributors

maxneuvians avatar renovate[bot] avatar sre-read-write[bot] avatar

Watchers

Calvin Rodo avatar  avatar Guillaume Charest avatar  avatar

dive-action's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • chore(deps): update actions/checkout action to v4
  • chore(deps): update actions/dependency-review-action action to v3
  • ๐Ÿ” Create all pending approval PRs at once ๐Ÿ”

Detected dependencies

github-actions
.github/workflows/ci.yml
.github/workflows/dependency-review.yml
  • actions/checkout v3.6.0@f43a0e5ff2bd294095638e18286ca9a3d1956744
  • actions/dependency-review-action v1.0.2@a9c83d3af6b9031e20feba03b904645bb23d1dab
.github/workflows/labels.yml
  • cds-snc/labels v1
.github/workflows/shellcheck.yml
  • actions/checkout v2.7.0@ee0669bd1cc54295c223e0bb666b733df41de1c5

  • Check this box to trigger a request for Renovate to run again on this repository

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.