Procházet zdrojové kódy

github: move permissions definitions to jobs [skip ci]

Victor Seva před 1 rokem
rodič
revize
ac0ecee293

+ 4 - 4
.github/workflows/alpine.yml

@@ -10,13 +10,13 @@ on:
 env:
   IMAGE_NAME: kamailio-ci
   SOURCE_BRANCH: ${{ github.ref_name }}
-permissions:
-  contents: read
-  packages: write 
+
 jobs:
   x86_64:
     runs-on: ubuntu-latest
-
+    permissions:
+      contents: read
+      packages: write 
     steps:
     - uses: actions/checkout@v4
 

+ 2 - 2
.github/workflows/cifuzz.yml

@@ -4,11 +4,11 @@ on:
     branches: [ "master" ]
   schedule:
     - cron: "30 0 * * *"
-permissions:
-  contents: read
 jobs:
   Fuzzing:
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     steps:
     - name: Build Fuzzers
       id: build

+ 0 - 2
.github/workflows/codeql.yml

@@ -5,8 +5,6 @@ on:
     branches: [ "master" ]
   schedule:
     - cron: "30 0 * * *"
-permissions:
-  contents: read
 jobs:
   analyze:
     name: Analyze

+ 2 - 2
.github/workflows/main.yml

@@ -6,11 +6,11 @@ name: build
       - master
   # Allows you to run this workflow manually from the Actions tab
   workflow_dispatch:
-permissions:
-  contents: read # to fetch code (actions/checkout)
 jobs:
   build:
     runs-on: ubuntu-latest
+    permissions:
+      contents: read # to fetch code (actions/checkout)
     container:
       image: ghcr.io/kamailio/pkg-kamailio-docker:${{ github.ref_name }}-${{ matrix.distribution }}
       volumes:

+ 4 - 2
.github/workflows/pull_request.yml

@@ -6,11 +6,11 @@ name: checks_pr
       - master
   # Allows you to run this workflow manually from the Actions tab
   workflow_dispatch:
-permissions:
-  contents: read # to fetch code (actions/checkout)
 jobs:
   check-format:
     runs-on: ubuntu-latest
+    permissions:
+      contents: read # to fetch code (actions/checkout)
     steps:
       - uses: actions/checkout@v4
       - uses: wolletd/[email protected]
@@ -18,6 +18,8 @@ jobs:
           target-ref: master
   build:
     runs-on: ubuntu-latest
+    permissions:
+      contents: read # to fetch code (actions/checkout)
     container:
       image: ghcr.io/kamailio/pkg-kamailio-docker:master-${{ matrix.distribution }}
       volumes: