danger-js icon indicating copy to clipboard operation
danger-js copied to clipboard

[BUG] Warning when using with the GitHub Action: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)

Open amakhrov opened this issue 11 months ago • 1 comments

Describe the bug

As per the the docs, we're using the danger/danger-js GHA action (docker-based) for running the checks in CI without installing Yarn. It prints the warnings

Build container for action use: '/home/runner/_work/_actions/danger/danger-js/92d2525fe338bff16ae7d42794d0a835e2d27473/Dockerfile'.
  /usr/bin/docker build -t 079b50:eead83866dcc40a99e8beb9b679b5b8a -f "/home/runner/_work/_actions/danger/danger-js/92d2525fe338bff16ae7d42794d0a835e2d27473/Dockerfile" "/home/runner/_work/_actions/danger/danger-js/92d2525fe338bff16ae7d42794d0a835e2d27473"

...

2 warnings found (use docker --debug to expand):
   - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 11)
   - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)

Workflow:

jobs:
  danger:
    runs-on: ubuntu
    steps:
      - name: Checkout repo
        uses: actions/[email protected]
      - name: Run Danger JS
        uses: danger/danger-js@92d2525fe338bff16ae7d42794d0a835e2d27473 # v12.3.3
        env:
          DANGER_GITHUB_API_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}

To Reproduce

Steps to reproduce the behavior:

  1. Run the workflow in GHA
  2. Observe the warnings above; the workflow fails

Expected behavior

The Docker container should build successfully and the workflow complete without warnings

Your Environment

software version
danger.js v12.3.3
node
npm
Operating System

EDITED I was mistaken about the error - it's just a warning from GHA - it doesn't actually prevent the workflow from completing. Still, it would be nice to fix it (sounds simple enough?)

amakhrov avatar Jan 21 '25 18:01 amakhrov

Open for PRs in this space, I don't use or know docker

orta avatar Mar 04 '25 08:03 orta

#1493

SimenB avatar Oct 31 '25 09:10 SimenB