Analyze container image efficiency using Dive.
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") |
Name | Description |
---|---|
efficiency | Efficiency of the image |
wasted-bytes | Number of wasted bytes |
user-wasted-percent | Percentage of space waster |
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
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