Skip to content

Commit 74a17d5

Browse files
committed
ci : limit write permission to only the release step
1 parent f05a6d7 commit 74a17d5

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
env:
18-
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1918
GGML_NLOOP: 3
2019
GGML_N_THREADS: 1
2120
LLAMA_LOG_COLORS: 1

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ concurrency:
1616
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
1717
cancel-in-progress: true
1818

19-
# Fine-grant permission
20-
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
21-
permissions:
22-
contents: write # for creating release
23-
2419
env:
2520
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
2621
CMAKE_ARGS: "-DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_TOOLS=ON -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON"
@@ -646,6 +641,11 @@ jobs:
646641
release:
647642
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
648643

644+
# Fine-grant permission
645+
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
646+
permissions:
647+
contents: write # for creating release
648+
649649
runs-on: ubuntu-latest
650650

651651
needs:

0 commit comments

Comments
 (0)