Skip to content

Commit f537c51

Browse files
author
CoderDeltaLAN
committed
ci: add minimal CI (noop) and CodeQL
1 parent 46bb93a commit f537c51

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@ name: CI
22
on:
33
push:
44
branches: [main]
5+
pull_request:
6+
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ci-${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
515
jobs:
616
noop:
17+
if: ${{ (github.event_name == 'push' && startsWith(github.ref,'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name,'ready')) }}
718
runs-on: ubuntu-latest
819
steps:
920
- uses: actions/checkout@v4
10-
- run: echo OK
21+
- run: echo "CI OK"

.github/workflows/codeql.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CodeQL
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
7+
8+
permissions:
9+
contents: read
10+
security-events: write
11+
12+
concurrency:
13+
group: codeql-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
analyze:
18+
if: ${{ (github.event_name == 'push' && startsWith(github.ref,'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name,'ready')) }}
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: github/codeql-action/init@v3
23+
with: { languages: python }
24+
- uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)