Skip to content

Commit 3a5e643

Browse files
committed
Update GitHub Actions.
See #2135
1 parent d762931 commit 3a5e643

File tree

2 files changed

+15
-62
lines changed

2 files changed

+15
-62
lines changed

.github/workflows/codeql.yml

Lines changed: 10 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,21 @@
1-
name: "CodeQL"
1+
# GitHub Actions for CodeQL Scanning
2+
3+
name: "CodeQL Advanced"
24

35
on:
46
push:
5-
branches: [ 'main' ]
67
pull_request:
7-
# The branches below must be a subset of the branches above
8-
branches: [ 'main' ]
8+
workflow_dispatch:
99
schedule:
10-
- cron: '23 3 * * 5'
10+
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
11+
- cron: '0 5 * * *'
12+
13+
permissions: read-all
1114

1215
jobs:
13-
analyze:
14-
name: Analyze
15-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
16-
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
16+
codeql-analysis-call:
1717
permissions:
1818
actions: read
1919
contents: read
2020
security-events: write
21-
22-
strategy:
23-
fail-fast: false
24-
matrix:
25-
language: [ 'java' ]
26-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
27-
# Use only 'java' to analyze code written in Java, Kotlin or both
28-
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
29-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
30-
31-
steps:
32-
- name: Checkout repository
33-
uses: actions/checkout@v3
34-
35-
- if: matrix.language == 'java'
36-
name: Set up JDK 17
37-
uses: actions/setup-java@v3
38-
with:
39-
java-version: '17'
40-
distribution: 'adopt'
41-
42-
# Initializes the CodeQL tools for scanning.
43-
- name: Initialize CodeQL
44-
uses: github/codeql-action/init@v3
45-
with:
46-
languages: ${{ matrix.language }}
47-
# If you wish to specify custom queries, you can do so here or in a config file.
48-
# By default, queries listed here will override any specified in a config file.
49-
# Prefix the list here with "+" to use these queries and those in the config file.
50-
51-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
52-
# queries: security-extended,security-and-quality
53-
54-
55-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
56-
# If this step fails, then you should remove it and run the build manually (see below)
57-
- name: Autobuild
58-
uses: github/codeql-action/autobuild@v3
59-
60-
# ℹ️ Command-line programs to run using the OS shell.
61-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
62-
63-
# If the Autobuild fails above, remove it and uncomment the following three lines.
64-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
65-
66-
# - run: |
67-
# echo "Run, Build Application using script"
68-
# ./location_of_script_within_repo/buildscript.sh
69-
70-
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v3
72-
with:
73-
category: "/language:${{matrix.language}}"
21+
uses: spring-io/github-actions/.github/workflows/codeql-analysis.yml@1

.github/workflows/project.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
pull_request_target:
1111
types: [opened, edited, reopened]
1212

13+
permissions:
14+
contents: read
15+
issues: write
16+
pull-requests: write
17+
1318
jobs:
1419
Inbox:
1520
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)