Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
ci: update global workflows (#587)
Browse files Browse the repository at this point in the history
  • Loading branch information
LizardByte-bot authored Sep 6, 2023
1 parent 9131ea7 commit 4168610
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-create-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Create Pull Request
uses: repo-sync/pull-request@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-qodana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare
id: prepare
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
- name: Qodana
id: qodana
continue-on-error: true # ensure dispatch-qodana job is run
uses: JetBrains/[email protected].1
uses: JetBrains/[email protected].6
with:
additional-cache-hash: ${{ github.ref }}-${{ matrix.language }}
artifact-name: qodana-${{ matrix.language }} # yamllint disable-line rule:line-length
Expand Down
23 changes: 20 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
schedule:
- cron: '00 12 * * 0' # every Sunday at 12:00 UTC

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
languages:
name: Get language matrix
Expand All @@ -35,6 +39,8 @@ jobs:
const supported_languages = ['cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift']
const remap_languages = {
'c++': 'cpp',
'c#': 'csharp',
'kotlin': 'java',
'typescript': 'javascript',
}
Expand All @@ -45,7 +51,7 @@ jobs:
"include": []
}
for (const [key, value] of Object.entries(response.data)) {
for (let [key, value] of Object.entries(response.data)) {
// remap language
if (remap_languages[key.toLowerCase()]) {
console.log(`Remapping language: ${key} to ${remap_languages[key.toLowerCase()]}`)
Expand Down Expand Up @@ -94,7 +100,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -109,8 +117,17 @@ jobs:
# 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
# queries: security-extended,security-and-quality

# Pre autobuild
# create a file named .codeql-prebuild-${{ matrix.language }}.sh in the root of your repository
- name: Prebuild
run: |
# check if .qodeql-prebuild-${{ matrix.language }}.sh exists
if [ -f "./.codeql-prebuild-${{ matrix.language }}.sh" ]; then
echo "Running .codeql-prebuild-${{ matrix.language }}.sh"
./.codeql-prebuild-${{ matrix.language }}.sh
fi
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# TODO: If this step fails, then we need to create a method to build the project using an automated method.
- name: Autobuild
uses: github/codeql-action/autobuild@v2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yaml-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Find additional files
id: find-files
Expand Down

0 comments on commit 4168610

Please sign in to comment.