Skip to content

Commit c174263

Browse files
MaisenbacherDigaw
authored andcommitted
CI: checkout commit that triggered the workflow
Until now we always checked out the default branch. Since we now allow workflow dispatches on forks this does not make sense anymore, and we should rather checkout the commit that triggered the workflow. Signed-off-by: Dennis Maisenbacher <[email protected]>
1 parent 5d8902a commit c174263

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/run-nightly-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
5252
git clone https://github.com/${{ github.repository }} nvme-cli
5353
cd nvme-cli
54+
git checkout ${{ github.sha }}
5455
scripts/build.sh -b release -c gcc
5556
sudo meson install -C .build-ci
5657
sudo ldconfig /usr/local/lib64
@@ -86,7 +87,9 @@ jobs:
8687
uname -a
8788
PIPX_BIN_DIR=/usr/local/bin pipx install nose2 --force
8889
git clone https://github.com/${{ github.repository }} /nvme-cli
90+
git config --global --add safe.directory /nvme-cli
8991
cd /nvme-cli
92+
git checkout ${{ github.sha }}
9093
scripts/build.sh -b release -c gcc
9194
CONTROLLER=$(echo "${BDEV0}" | sed 's/n[0-9]*$//')
9295
cat > tests/config.json << EOJ

0 commit comments

Comments
 (0)