Skip to content

Commit 46847e6

Browse files
authored
ci : set default permissions (ggml-org#29945)
1 parent 2bc5635 commit 46847e6

57 files changed

Lines changed: 298 additions & 83 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ai-issues.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
issues:
55
types: [opened]
66

7+
cache-mode: none
8+
permissions:
9+
contents: read
10+
711
jobs:
812
find-related:
913
if: github.event.action == 'opened'

‎.github/workflows/build-3rd-party.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
'**/*.cpp'
1616
]
1717

18+
cache-mode: none
19+
permissions:
20+
contents: read
21+
1822
concurrency:
1923
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
2024
cancel-in-progress: true

‎.github/workflows/build-and-test-snapdragon.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
- 'scripts/snapdragon/**'
2424
- 'CMakePresets.json'
2525

26+
cache-mode: none
27+
permissions:
28+
contents: read
29+
2630
concurrency:
2731
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
2832
cancel-in-progress: true
@@ -36,6 +40,10 @@ jobs:
3640
run:
3741
shell: bash
3842

43+
permissions:
44+
actions: write
45+
contents: read
46+
3947
steps:
4048
- name: Clone
4149
uses: actions/checkout@v6
@@ -66,6 +74,10 @@ jobs:
6674
run:
6775
shell: bash
6876

77+
permissions:
78+
actions: write
79+
contents: read
80+
6981
steps:
7082
- name: Clone
7183
uses: actions/checkout@v6
@@ -98,6 +110,10 @@ jobs:
98110
matrix:
99111
device: [SM8750, SM8850, QCS9075M]
100112

113+
permissions:
114+
actions: read
115+
contents: read
116+
101117
steps:
102118
- name: Checkout
103119
uses: actions/checkout@v6

‎.github/workflows/build-android.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
- '.github/workflows/build-android.yml'
2121
- 'examples/llama.android/**'
2222

23+
cache-mode: none
24+
permissions:
25+
contents: read
26+
2327
concurrency:
2428
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
2529
cancel-in-progress: true
@@ -66,6 +70,10 @@ jobs:
6670
run:
6771
shell: bash
6872

73+
permissions:
74+
actions: write
75+
contents: read
76+
6977
steps:
7078
- name: Clone
7179
uses: actions/checkout@v6

‎.github/workflows/build-apple.yml‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ on:
2626
'ggml/src/ggml-rpc/**'
2727
]
2828

29+
cache-mode: none
30+
permissions:
31+
contents: read
32+
2933
concurrency:
3034
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
3135
cancel-in-progress: true
@@ -50,7 +54,7 @@ jobs:
5054
- name: ccache
5155
uses: ggml-org/ccache-action@v1.2.24
5256
with:
53-
key: apple-arm64
57+
restore: false
5458
save: false
5559

5660
- name: ccache-buckets-restore
@@ -113,7 +117,7 @@ jobs:
113117
- name: ccache
114118
uses: ggml-org/ccache-action@v1.2.24
115119
with:
116-
key: apple-x64
120+
restore: false
117121
save: false
118122

119123
- name: ccache-buckets-restore
@@ -161,6 +165,10 @@ jobs:
161165
macos-latest-ios-xcode:
162166
runs-on: macos-latest
163167

168+
permissions:
169+
actions: write
170+
contents: read
171+
164172
steps:
165173
- name: Checkout code
166174
uses: actions/checkout@v6
@@ -258,6 +266,10 @@ jobs:
258266
runs-on: macos-latest
259267
needs: macos-latest-ios-xcode
260268

269+
permissions:
270+
actions: read
271+
contents: read
272+
261273
strategy:
262274
matrix:
263275
destination: ['generic/platform=macOS', 'generic/platform=iOS', 'generic/platform=tvOS']

‎.github/workflows/build-cache.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
schedule:
66
- cron: '0 * * * *'
77

8+
cache-mode: write
9+
permissions:
10+
contents: read
11+
812
concurrency:
913
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
1014
cancel-in-progress: true

‎.github/workflows/build-cann.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ on:
2222
'ggml/src/ggml-cann/**'
2323
]
2424

25+
cache-mode: none
26+
permissions:
27+
contents: read
28+
2529
concurrency:
2630
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
2731
cancel-in-progress: true

‎.github/workflows/build-cmake-pkg.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
workflow_dispatch:
44
workflow_call:
55

6+
cache-mode: none
7+
permissions:
8+
contents: read
9+
610
jobs:
711
linux:
812
runs-on: [self-hosted, Linux, CPU]

‎.github/workflows/build-cpu.yml‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ on:
3030
'**/*.cpp'
3131
]
3232

33+
cache-mode: none
34+
permissions:
35+
contents: read
36+
3337
concurrency:
3438
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
3539
cancel-in-progress: true
@@ -65,7 +69,7 @@ jobs:
6569
- name: ccache
6670
uses: ggml-org/ccache-action@v1.2.24
6771
with:
68-
key: cpu-${{ matrix.os }}
72+
restore: false
6973
save: false
7074

7175
- name: Build Dependencies
@@ -142,6 +146,11 @@ jobs:
142146
name: windows / ${{ matrix.build }}
143147
runs-on: windows-2025
144148

149+
cache-mode: write
150+
permissions:
151+
actions: write
152+
contents: read
153+
145154
env:
146155
OPENBLAS_VERSION: 0.3.23
147156
SDE_VERSION: 9.33.0-2024-01-07

‎.github/workflows/build-cross.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
schedule:
1616
- cron: '0 0 * * 0'
1717

18+
cache-mode: none
19+
permissions:
20+
contents: read
21+
1822
concurrency:
1923
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
2024
cancel-in-progress: true

0 commit comments

Comments
 (0)