diff --git a/.github/workflows/ncm-report.yml b/.github/workflows/ncm-report.yml index b54f40c..4fa96f7 100644 --- a/.github/workflows/ncm-report.yml +++ b/.github/workflows/ncm-report.yml @@ -10,7 +10,7 @@ jobs: - run: npm install - name: NCM Report id: report - uses: nodesource/ncm-report-github-action@v1.2.0 + uses: nodesource/ncm-report-github-action@gate with: token: ${{ secrets.NCM_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 1c0ea20..25b3402 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,9 @@ LABEL repository="https://github.com/nodesource/ncm-github-action" LABEL homepage="https://nodesource.com" LABEL maintainer="NodeSource" -RUN apt-get update && apt-get install -y g++ build-essential -RUN npm install -g ncm-cli - -COPY entrypoint.sh /entrypoint.sh +RUN echo "deb http://security.debian.org/debian-security bullseye-security main contrib non-free" > /etc/apt/sources.list +RUN apt-get update && apt-get install -y g++ dpkg-dev gcc libc6-dev make +RUN npm install -g https://github.com/nodesource/ncm-cli.git#gate +COPY . / ENTRYPOINT ["/entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh index 07db107..c962aa9 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,14 +1,6 @@ #!/bin/bash -l -if [[ "$2" = "yes" ]] -then - FORCE_COLOR=1 IS_GITHUB_ACTION=true NCM_TOKEN=$1 ncm report --long -elif [[ "$3" = "yes" ]] -then - FORCE_COLOR=1 IS_GITHUB_ACTION=true NCM_TOKEN=$1 ncm report --compliance -elif [[ "$4" = "yes" ]] -then - FORCE_COLOR=1 IS_GITHUB_ACTION=true NCM_TOKEN=$1 ncm report --security -else - FORCE_COLOR=1 IS_GITHUB_ACTION=true NCM_TOKEN=$1 ncm report -fi +FORCE_COLOR=1 IS_GITHUB_ACTION=true NCM_TOKEN=$1 ncm report --gate > report.json +cat report.json +cat ncm-annotate.sh +chmod +x ncm-annotate.sh diff --git a/package.json b/package.json new file mode 100644 index 0000000..257ed4a --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "ncm-report-github-action", + "version": "1.0.0", + "description": "![NodeSource Certification process](https://github.com/nodesource/ncm-report-github-action/workflows/NodeSource%20Certification%20process/badge.svg?event=push)", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nodesource/ncm-report-github-action.git" + }, + "author": "NodeSource", + "license": "ISC", + "bugs": { + "url": "https://github.com/nodesource/ncm-report-github-action/issues" + }, + "homepage": "https://github.com/nodesource/ncm-report-github-action#readme" +}