yuichielectric / dive-action

Runs dive as GitHub action to scan your Docker image to find wasted disk space
MIT License
11 stars 14 forks source link

--ci-config misplaced #194

Open pindge opened 3 years ago

pindge commented 3 years ago
Digest: sha256:2d3be9e9362ecdcb04bf3afdd402a785b877e3bcca3d2fc6e10a83d99ce0955f
Status: Downloaded newer image for wagoodman/dive:v0.9
docker.io/wagoodman/dive:v0.9
/usr/bin/docker run -e CI=true -e DOCKER_API_VERSION=1.37 --rm -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=/home/runner/work/datacube-ows/datacube-ows/dive-ci.yml,target=/.dive-ci --ci-config /.dive-ci wagoodman/dive:v0.9 ${ORG}/${IMAGE}:_builder
unknown flag: --ci-config
See 'docker run --help'.

https://github.com/opendatacube/datacube-ows/pull/613/checks?check_run_id=2691139167'

It is returning error for us, I believe the tag --ci-config is misplaced, it should be placed after wagoodman/div:v0.9 instead of before

whatnick commented 3 years ago

These variables need to placed after the diveImage parameter since they are parameters being sent to the dive command within the dive docker image rather that docker cli itself.

nwmcsween commented 3 years ago

see #204

wildone commented 2 years ago

update config-file: ${{ github.workspace }}/.dive-ci.yml to use ${{ env.GITHUB_WORKSPACE }}

  - name: Run docker image analysis
    uses: yuichielectric/dive-action@0.0.4
    with:
      image: ${{ env.IMAGE }}:${{ env.GIT_BRANCH }}
      config-file: ${{ env.GITHUB_WORKSPACE }}/.dive-ci.yml
      github-token: ${{ secrets.GITHUB_TOKEN }}