summaryrefslogtreecommitdiffstats
path: root/.github/workflows/codeql-analysis.yml
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-07-27 01:32:00 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-07-27 01:32:00 +0200
commit14c17faef6ebf4f741ae43f31a7902b3337b779d (patch)
treeafaf2d868440846dec47416de11d3136a6fab544 /.github/workflows/codeql-analysis.yml
parent25829f4890ad5f15391df7aefb885b27fe2e2174 (diff)
downloadgohugo-theme-ed-14c17faef6ebf4f741ae43f31a7902b3337b779d.tar.gz
Add CodeQL analysis to GH workflows
Diffstat (limited to '.github/workflows/codeql-analysis.yml')
-rw-r--r--.github/workflows/codeql-analysis.yml47
1 files changed, 47 insertions, 0 deletions
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000..0b4de2c
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,47 @@
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ main ]
+ pull_request:
+ branches: [ main ]
+ schedule:
+ - cron: '0 11 * * *'
+ # | | | | |
+ # | | | | |____ day of the week (0 - 6 or SUN-SAT)
+ # | | | |____ month (1 - 12 or JAN-DEC)
+ # | | |____ day of the month (1 - 31)
+ # | |____ hour (0 - 23)
+ # |____ minute (0 - 59)
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'javascript' ]
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v2
+
+ - name: Build site
+ run: |
+ hugo --verbose --source=exampleSite --buildDrafts --buildFuture
+ env:
+ HUGO_RESOURCEDIR: '../resources'
+ HUGO_ENV: development
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2