Skip to content

Commit

Permalink
Add packge permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
vasil-pashov committed Oct 17, 2024
1 parent d2f6e78 commit 6e3bd5f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
jobs:
polaris-scan:
runs-on: [ ubuntu-latest]
permissions:
packages: write
env:
VCPKG_NUGET_USER: ${{secrets.VCPKG_NUGET_USER || github.repository_owner}}
VCPKG_NUGET_TOKEN: ${{secrets.VCPKG_NUGET_TOKEN || secrets.GITHUB_TOKEN}}
VCPKG_MAN_NUGET_USER: ${{secrets.VCPKG_MAN_NUGET_USER}} # For forks to download pre-compiled dependencies from the Man repo
VCPKG_MAN_NUGET_TOKEN: ${{secrets.VCPKG_MAN_NUGET_TOKEN}}
steps:
- name: Checkout Source
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Setup build dependencies
run: |
Expand All @@ -30,21 +31,17 @@
echo -e "VCPKG_BINARY_SOURCES=$VCPKG_BINARY_SOURCES
VCPKG_ROOT=$PLATFORM_VCPKG_ROOT" | tee -a $GITHUB_ENV
- name: Prepare C++ compilation env
run: . build_tooling/prep_cpp_build.sh

- name: Get CMake
uses: lukka/get-cmake@v3.29.2
uses: lukka/get-cmake@latest

- name: CMake configure
uses: lukka/run-cmake@v10.8
with:
cmakeListsTxtPath: ${{github.workspace}}/cpp/CMakeLists.txt
configurePreset: linux-debug
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']"
configurePresetAdditionalArgs: "['-DVCPKG_INSTALL_OPTIONS=--clean-after-build']"

- name: Polaris PR Scan
if: ${{ github.event_name == 'pull_request' }}
uses: synopsys-sig/synopsys-action@v1.13.0
with:
polaris_server_url: ${{ vars.POLARIS_SERVER_URL }}
Expand Down

0 comments on commit 6e3bd5f

Please sign in to comment.