Skip to content

Commit

Permalink
Add Dependabot and eslint workflows (#61)
Browse files Browse the repository at this point in the history
* Add dependabot and eslint actions

* Review comments

* Review typos fixing
  • Loading branch information
nielm authored Nov 27, 2023
1 parent 21e310c commit 2540807
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 6 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
updates:
- directory: "/"
package-ecosystem: "github-actions"
schedule:
interval: "daily"
- directory: "/cloudrun-malware-scanner"
package-ecosystem: "npm"
schedule:
interval: "daily"
- directory: "/cloudrun-malware-scanner"
package-ecosystem: "docker"
schedule:
interval: "daily"
version: 2
...
5 changes: 1 addition & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '27 22 * * 5'

Expand All @@ -38,7 +35,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "ESLint and NPM audit"

on:
push:
pull_request:

jobs:
analyze:
name: "Eslint-analyze"
runs-on: ubuntu-latest
permissions:
actions: read
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 21
check-latest: true

# Install eslint
- name: Install eslint
working-directory: cloudrun-malware-scanner/
run: npm install

- name: NPM Audit
working-directory: cloudrun-malware-scanner/
run: npm audit

- name: ESlint
working-directory: cloudrun-malware-scanner/
run: npm run eslint
2 changes: 1 addition & 1 deletion cloudrun-malware-scanner/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
"ecmaVersion": 2020
},
"rules": {
}
Expand Down
2 changes: 1 addition & 1 deletion cloudrun-malware-scanner/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2540807

Please sign in to comment.