Skip to content

Commit

Permalink
CI: fix syntax error in codeql.yml (#29)
Browse files Browse the repository at this point in the history
* CI: fix syntax error in codeql.yml

Attempt to fix syntax error:

```
Check failure on line 46 in .github/workflows/codeql.yml
GitHub Actions / CodeQL

Invalid workflow file

The workflow is not valid. .github/workflows/codeql.yml (Line: 46, Col: 17): Unexpected value ''
```

See log: https://github.com/mundialis/github-workflows/actions/runs/9971374622/workflow

* fix language definition

* add dummy data for codeql

* update dummy c file

* rename dummy file

* simplify codeql workflow

* try autobuild mode

* no c

---------

Co-authored-by: Carmen <[email protected]>
  • Loading branch information
neteler and mmacata authored Nov 26, 2024
1 parent e645952 commit 6c37f42
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: CodeQL

on:
push:
branches:
- main
pull_request:
branches: [ "main" ]
schedule:
# Check every Saturday at 12:36
- cron: 36 12 * * 6

permissions: {}

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
packages: read
actions: read
contents: read

strategy:
fail-fast: false
matrix:
language:
- python
# - c-cpp
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
5 changes: 5 additions & 0 deletions dummy_data/dummy.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <stdio.h>
int main() {
printf("Hello, World!");
exit(EXIT_SUCCESS);
}
1 change: 1 addition & 0 deletions dummy_data/dummy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# empty python file for codeql workflow

0 comments on commit 6c37f42

Please sign in to comment.