github: Move permissions to the individual jobs
SonarQube complains about workflow-level "allow" permissions.
This commit is contained in:
@@ -6,9 +6,6 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CCACHE_BASEDIR: ${{ github.workspace }}
|
CCACHE_BASEDIR: ${{ github.workspace }}
|
||||||
CCACHE_COMPRESS: true
|
CCACHE_COMPRESS: true
|
||||||
@@ -32,6 +29,8 @@ jobs:
|
|||||||
needs: pre-check
|
needs: pre-check
|
||||||
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
env:
|
env:
|
||||||
TEST: android
|
TEST: android
|
||||||
# since the NDK might be newly installed, we have to use this to avoid cache misses
|
# since the NDK might be newly installed, we have to use this to avoid cache misses
|
||||||
|
|||||||
@@ -2,12 +2,11 @@ name: Cache cleanup
|
|||||||
|
|
||||||
on: delete
|
on: delete
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cleanup:
|
cleanup:
|
||||||
runs-on: ubuntu-slim
|
runs-on: ubuntu-slim
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
steps:
|
steps:
|
||||||
- env:
|
- env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# this test case does not actually test anything but tries to access system
|
# this test case does not actually test anything but tries to access system
|
||||||
# directories that might be inaccessible on build hosts
|
# directories that might be inaccessible on build hosts
|
||||||
@@ -35,6 +32,8 @@ jobs:
|
|||||||
needs: pre-check
|
needs: pre-check
|
||||||
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
||||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -160,6 +159,8 @@ jobs:
|
|||||||
needs: pre-check
|
needs: pre-check
|
||||||
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -260,6 +261,8 @@ jobs:
|
|||||||
needs: pre-check
|
needs: pre-check
|
||||||
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-22.04 ]
|
os: [ ubuntu-22.04 ]
|
||||||
@@ -342,6 +345,8 @@ jobs:
|
|||||||
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: alpine:latest
|
container: alpine:latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
env:
|
env:
|
||||||
TESTS_REDUCED_KEYLENGTHS: yes
|
TESTS_REDUCED_KEYLENGTHS: yes
|
||||||
TEST: alpine
|
TEST: alpine
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TESTS_REDUCED_KEYLENGTHS: yes
|
TESTS_REDUCED_KEYLENGTHS: yes
|
||||||
CCACHE_BASEDIR: ${{ github.workspace }}
|
CCACHE_BASEDIR: ${{ github.workspace }}
|
||||||
@@ -36,6 +33,8 @@ jobs:
|
|||||||
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
env:
|
env:
|
||||||
TEST: macos
|
TEST: macos
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CCACHE_BASEDIR: ${{ github.workspace }}
|
CCACHE_BASEDIR: ${{ github.workspace }}
|
||||||
CCACHE_COMPRESS: true
|
CCACHE_COMPRESS: true
|
||||||
@@ -31,6 +28,8 @@ jobs:
|
|||||||
needs: pre-check
|
needs: pre-check
|
||||||
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
env:
|
env:
|
||||||
TEST: sonarcloud
|
TEST: sonarcloud
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
CCACHE_CONTAINER: /root/.ccache
|
CCACHE_CONTAINER: /root/.ccache
|
||||||
@@ -32,6 +29,8 @@ jobs:
|
|||||||
needs: pre-check
|
needs: pre-check
|
||||||
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
env:
|
env:
|
||||||
TEST: tkm
|
TEST: tkm
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TESTS_REDUCED_KEYLENGTHS: yes
|
TESTS_REDUCED_KEYLENGTHS: yes
|
||||||
CCACHE_COMPRESS: true
|
CCACHE_COMPRESS: true
|
||||||
@@ -34,6 +31,8 @@ jobs:
|
|||||||
needs: pre-check
|
needs: pre-check
|
||||||
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
test: [ win64, win32 ]
|
test: [ win64, win32 ]
|
||||||
@@ -80,6 +79,8 @@ jobs:
|
|||||||
needs: pre-check
|
needs: pre-check
|
||||||
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
|||||||
Reference in New Issue
Block a user