Skip to content

[Snyk] Fix for 1 vulnerabilities #83

[Snyk] Fix for 1 vulnerabilities

[Snyk] Fix for 1 vulnerabilities #83

Workflow file for this run

name: run on pull request [v6]
on:
pull_request:
branches:
- main
- develop
jobs:
run-on-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup env
id: node-version
run: |
docker build -t mew-build-container .
echo ::set-output name=NODE_VERSION::$(docker run --rm -v `pwd`:/home:rw mew-build-container /bin/bash -c "node --version")
- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-${{steps.node-version.outputs.NODE_VERSION}}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{steps.node-version.outputs.NODE_VERSION}}-
- name: npm install
run: docker run --rm -v `pwd`:/home:rw --user "$(id -u):$(id -g)" mew-build-container /bin/bash -c "npm install"
- name: build
run: docker run --rm -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm run build:hash"
- name: add to codecov
run: |
ci_env='-e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID'
docker run $ci_env --rm -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm run codecov"
- name: upload to codecov
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true