Skip to content

Commit afe0c97

Browse files
committed
fix(ci): checkout no persist credentials
1 parent 16d4a3c commit afe0c97

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
timeout-minutes: 45
2626
steps:
2727
- uses: actions/checkout@v4
28+
with:
29+
persist-credentials: false
2830
- uses: dtolnay/rust-toolchain@master
2931
with:
3032
toolchain: ${{matrix.toolchain}}
@@ -48,6 +50,8 @@ jobs:
4850
timeout-minutes: 45
4951
steps:
5052
- uses: actions/checkout@v4
53+
with:
54+
persist-credentials: false
5155
- uses: dtolnay/rust-toolchain@master
5256
with:
5357
toolchain: 1.77.0
@@ -67,6 +71,8 @@ jobs:
6771
RUSTDOCFLAGS: -Dwarnings
6872
steps:
6973
- uses: actions/checkout@v4
74+
with:
75+
persist-credentials: false
7076
- uses: dtolnay/rust-toolchain@nightly
7177
- uses: dtolnay/install@cargo-docs-rs
7278
- run: cargo docs-rs --package ktls
@@ -78,6 +84,8 @@ jobs:
7884
timeout-minutes: 45
7985
steps:
8086
- uses: actions/checkout@v4
87+
with:
88+
persist-credentials: false
8189
- uses: dtolnay/rust-toolchain@master
8290
with:
8391
toolchain: 1.77.0

.github/workflows/kernel-compatibility-test.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
description: "Space-separated list of Linux kernel versions to test (e.g., '6.12 6.6 6.1.148 5.15.189 5.10.240 5.4.296')"
1818
required: true
1919

20+
permissions:
21+
contents: read
22+
2023
jobs:
2124
prepare-matrix:
2225
runs-on: ubuntu-latest
@@ -26,9 +29,9 @@ jobs:
2629
- name: Set matrix
2730
id: set-matrix
2831
run: |
29-
if [ -n "${{ github.event.inputs.kernel_versions }}" ]; then
32+
if [ -n "${GITHUB_EVENT_INPUTS_KERNEL_VERSIONS}" ]; then
3033
# Manual trigger with custom versions
31-
versions="${{ github.event.inputs.kernel_versions }}"
34+
versions="${GITHUB_EVENT_INPUTS_KERNEL_VERSIONS}"
3235
echo "Using manual input versions: $versions"
3336
else
3437
# Default versions for push events
@@ -40,6 +43,8 @@ jobs:
4043
json_array=$(echo "$versions" | tr ' ' '\n' | jq -R . | jq -s -c .)
4144
echo "matrix={\"kernel_version\":$json_array}" >> $GITHUB_OUTPUT
4245
echo "Generated matrix: {\"kernel_version\":$json_array}"
46+
env:
47+
GITHUB_EVENT_INPUTS_KERNEL_VERSIONS: ${{ github.event.inputs.kernel_versions }}
4348

4449
build:
4550
needs: prepare-matrix
@@ -52,6 +57,8 @@ jobs:
5257
steps:
5358
- name: Checkout repository
5459
uses: actions/checkout@v4
60+
with:
61+
persist-credentials: false
5562

5663
- name: Install dependencies
5764
run: |
@@ -165,7 +172,7 @@ jobs:
165172
run: |
166173
qemu-system-x86_64 \
167174
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \
168-
-kernel linux-${{ env.KERNEL_VERSION }}/arch/x86/boot/bzImage \
175+
-kernel linux-${KERNEL_VERSION}/arch/x86/boot/bzImage \
169176
-initrd initramfs.cpio.gz \
170177
-netdev user,id=net0 \
171178
-device e1000,netdev=net0 \

0 commit comments

Comments
 (0)