Skip to content

Commit 02b1e65

Browse files
committed
fix: Awesome Workflow issues
Thanks to @tjgurwara99 for the original fix: TheAlgorithms/C#1176
1 parent 1371b53 commit 02b1e65

File tree

3 files changed

+32
-24
lines changed

3 files changed

+32
-24
lines changed

.github/workflows/awesome_workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
- uses: actions/setup-python@v2
1616
- name: requirements
1717
run: |
18-
sudo apt -qq -y update
19-
sudo apt -qq install clang-tidy-10 clang-format-10
18+
sudo apt-get -qq update
19+
sudo apt-get -qq install clang-tidy clang-format
2020
# checks are passing with less errors when used with this version.
2121
# The default installs v6.0 which did not work out well in my tests
2222
- name: Setup Git Specs
Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,56 @@
11
name: "CodeQL"
2-
on: [push, pull_request]
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
38

49
jobs:
510
analyze:
611
name: Analyze
712
runs-on: ubuntu-latest
13+
permissions:
14+
actions: read
15+
contents: read
16+
security-events: write
817

918
strategy:
1019
fail-fast: false
1120
matrix:
1221
language: [ 'cpp' ]
13-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
14-
# Learn more:
15-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
16-
1722
steps:
1823
- name: Checkout repository
19-
uses: actions/checkout@main
20-
21-
# Initializes the CodeQL tools for scanning.
24+
uses: actions/checkout@v3
2225
- name: Initialize CodeQL
23-
uses: github/codeql-action/init@main
26+
uses: github/codeql-action/init@v2
2427
with:
2528
languages: ${{ matrix.language }}
2629
# If you wish to specify custom queries, you can do so here or in a config file.
2730
# By default, queries listed here will override any specified in a config file.
2831
# Prefix the list here with "+" to use these queries and those in the config file.
29-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
3032

31-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
33+
# 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
34+
# queries: security-extended,security-and-quality
35+
36+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
3237
# If this step fails, then you should remove it and run the build manually (see below)
3338
- name: Autobuild
34-
uses: github/codeql-action/autobuild@main
39+
uses: github/codeql-action/autobuild@v2
3540

3641
# ℹ️ Command-line programs to run using the OS shell.
37-
# 📚 https://git.io/JvXDl
42+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
3843

39-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
40-
# and modify them (or add more) to build your code if your project
41-
# uses a compiled language
44+
# If the Autobuild fails above, remove it and uncomment the following three lines.
45+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
4246

43-
#- run: |
44-
# make bootstrap
45-
# make release
47+
# - run: |
48+
# echo "Run, Build Application using script"
49+
# ./location_of_script_within_repo/buildscript.sh
50+
#
51+
# In our case, this would be a CMake build step.
4652

4753
- name: Perform CodeQL Analysis
48-
uses: github/codeql-action/analyze@main
54+
uses: github/codeql-action/analyze@v2
55+
with:
56+
category: "/language:${{matrix.language}}"

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
build:
99
runs-on: macos-latest
1010
steps:
11-
- uses: actions/checkout@master
11+
- uses: actions/checkout@v3
1212
with:
1313
submodules: true
1414
- name: Install requirements
@@ -19,7 +19,7 @@ jobs:
1919
- name: build
2020
run: cmake --build build -t doc
2121
- name: gh-pages
22-
uses: actions/checkout@master
22+
uses: actions/checkout@v3
2323
with:
2424
ref: "gh-pages"
2525
clean: false

0 commit comments

Comments
 (0)