Skip to content

MartinHeinz/dive-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Dive GitHub Action

Release GitHub Marketplace

Analyze container image efficiency using Dive.

Usage

Inputs

Name Type Required Default Description
image String true Container image to analyze
config String false ${{ github.workspace }}/.dive-ci Path to dive config file
exit-zero String false false Whether to force exit with zero even when scan fails ("true"/"false")

Outputs

Name Description
efficiency Efficiency of the image
wasted-bytes Number of wasted bytes
user-wasted-percent Percentage of space waster

Example

name: "Example Workflow with Dive"

on: [push]

jobs:
  sample-workflow:
    runs-on: ubuntu-latest
    name: Analyze image efficiency using Dive
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Analyze image efficiency
        uses: MartinHeinz/dive-action@v0.1.0
        with:
          image: 'ghcr.io/github-username/some-image:latest'
          config: ${{ github.workspace }}/.dive-ci

Development

Install and build:

npm install
npm run build

Package and release:

npm i -g @vercel/ncc

npm run build
ncc build --source-map --license LICENSE
git commit -m "..."
git tag -a -m "..." vX.Y.Z
git push --follow-tags