Skip to content

Commit f082da0

Browse files
committed
Update GitHub Actions.
See #2091
1 parent e50ae46 commit f082da0

File tree

2 files changed

+55
-62
lines changed

2 files changed

+55
-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', '1.0.x', '1.1.x', '1.2.x', '1.3.x', '1.4.x', '1.5.x', '2.0.x', '2.1.x', '2.2.x', '3.0.x', '3.1.x', '3.2.x', '4.0.x', '4.1.x', '4.2.x', '4.3.x', '4.4.x', '5.0.x', '5.1.x' ]
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: '59 19 * * 2'
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@v2
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@v2
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@v2
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: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# GitHub Actions to automate GitHub issues for Spring Data Project Management
2+
3+
name: Spring Data GitHub Issues
4+
5+
on:
6+
issues:
7+
types: [opened, edited, reopened]
8+
issue_comment:
9+
types: [created]
10+
pull_request_target:
11+
types: [opened, edited, reopened]
12+
13+
permissions:
14+
contents: read
15+
issues: write
16+
pull-requests: write
17+
18+
jobs:
19+
Inbox:
20+
runs-on: ubuntu-latest
21+
if: github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request == null && !contains(join(github.event.issue.labels.*.name, ', '), 'dependency-upgrade') && !contains(github.event.issue.title, 'Release ')
22+
steps:
23+
- name: Create or Update Issue Card
24+
uses: actions/[email protected]
25+
with:
26+
project-url: https://github.com/orgs/spring-projects/projects/25
27+
github-token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}
28+
Pull-Request:
29+
runs-on: ubuntu-latest
30+
if: github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request != null
31+
steps:
32+
- name: Create or Update Pull Request Card
33+
uses: actions/[email protected]
34+
with:
35+
project-url: https://github.com/orgs/spring-projects/projects/25
36+
github-token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}
37+
Feedback-Provided:
38+
runs-on: ubuntu-latest
39+
if: github.repository_owner == 'spring-projects' && github.event_name == 'issue_comment' && github.event.action == 'created' && github.actor != 'spring-projects-issues' && github.event.pull_request == null && github.event.issue.state == 'open' && contains(toJSON(github.event.issue.labels), 'waiting-for-feedback')
40+
steps:
41+
- name: Update Project Card
42+
uses: actions/[email protected]
43+
with:
44+
project-url: https://github.com/orgs/spring-projects/projects/25
45+
github-token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}

0 commit comments

Comments
 (0)