Skip to content

Commit e7a5ce2

Browse files
committed
Add packge permissions
1 parent d2f6e78 commit e7a5ce2

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

.github/workflows/static_analysis.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@
33
on: [pull_request]
44
jobs:
55
polaris-scan:
6-
runs-on: [ ubuntu-latest]
7-
env:
6+
name: Polaris Coverity Static Analysis
7+
permissions:
8+
packages: write
9+
runs-on: ubuntu-latest
10+
env:
811
VCPKG_NUGET_USER: ${{secrets.VCPKG_NUGET_USER || github.repository_owner}}
912
VCPKG_NUGET_TOKEN: ${{secrets.VCPKG_NUGET_TOKEN || secrets.GITHUB_TOKEN}}
10-
VCPKG_MAN_NUGET_USER: ${{secrets.VCPKG_MAN_NUGET_USER}} # For forks to download pre-compiled dependencies from the Man repo
11-
VCPKG_MAN_NUGET_TOKEN: ${{secrets.VCPKG_MAN_NUGET_TOKEN}}
1213
steps:
1314
- name: Checkout Source
1415
uses: actions/checkout@v4
1516
with:
1617
submodules: recursive
18+
fetch-depth: 0
1719

1820
- name: Setup build dependencies
1921
run: |
@@ -30,21 +32,17 @@
3032
echo -e "VCPKG_BINARY_SOURCES=$VCPKG_BINARY_SOURCES
3133
VCPKG_ROOT=$PLATFORM_VCPKG_ROOT" | tee -a $GITHUB_ENV
3234
33-
- name: Prepare C++ compilation env
34-
run: . build_tooling/prep_cpp_build.sh
35-
3635
- name: Get CMake
37-
uses: lukka/get-cmake@v3.29.2
36+
uses: lukka/get-cmake@latest
3837

3938
- name: CMake configure
4039
uses: lukka/[email protected]
4140
with:
4241
cmakeListsTxtPath: ${{github.workspace}}/cpp/CMakeLists.txt
4342
configurePreset: linux-debug
44-
configurePresetAdditionalArgs: "['-DVCPKG_INSTALL_OPTIONS=--clean-after-build', '-DCMAKE_CXX_COMPILER=g++-10', '-DCMAKE_C_COMPILER=gcc-10', '-DVCPKG_INSTALL_OPTIONS=--debug', '-DCMAKE_MODULE_PATH=cpp/CMake']"
43+
configurePresetAdditionalArgs: "['-DVCPKG_INSTALL_OPTIONS=--clean-after-build']"
4544

4645
- name: Polaris PR Scan
47-
if: ${{ github.event_name == 'pull_request' }}
4846
uses: synopsys-sig/[email protected]
4947
with:
5048
polaris_server_url: ${{ vars.POLARIS_SERVER_URL }}

0 commit comments

Comments
 (0)