Skip to content

Commit f28b1ee

Browse files
author
Kevin Mack
committed
Removing parameters
1 parent f855f80 commit f28b1ee

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

.github/workflows/codeql.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,28 +53,19 @@ jobs:
5353
echo "Determine the latest release version of CodeQL CLI"
5454
docker exec hostsvc-link bash -c "LATEST_RELEASE=$(curl -s https://api.github.com/repos/github/codeql-cli-binaries/releases/latest | grep \"tag_name\" | awk '{print substr($2, 2, length($2)-3)}')"
5555
56-
echo "Define the download URL and target directory"
57-
docker exec hostsvc-link bash -c "DOWNLOAD_URL=\"https://github.com/github/codeql-cli-binaries/releases/download/${LATEST_RELEASE}/codeql-linux64.zip\""
58-
docker exec hostsvc-link bash -c "TARGET_DIR=\"~/codeql\""
59-
docker exec hostsvc-link bash -c "ZIP_FILE=\"$TARGET_DIR/codeql.zip\""
60-
6156
echo "Create target directory if it doesn't exist"
62-
docker exec hostsvc-link bash -c "mkdir -p \"$TARGET_DIR\""
57+
docker exec hostsvc-link bash -c "mkdir -p \"${{ github.workspace }}/codeql\""
6358
6459
echo "Download the latest release of CodeQL CLI"
6560
echo "Downloading CodeQL CLI ${LATEST_RELEASE}..."
66-
docker exec hostsvc-link bash -c "curl -L \"$DOWNLOAD_URL\" -o \"$ZIP_FILE\""
61+
docker exec hostsvc-link bash -c "curl -L \"https://github.com/github/codeql-cli-binaries/releases/download/${LATEST_RELEASE}/codeql-linux64.zip\" -o \"${{ github.workspace }}/codeql/codeql.zip\""
6762
6863
echo "Extract the downloaded zip file"
6964
echo "Extracting CodeQL CLI..."
70-
docker exec hostsvc-link bash -c "unzip -o \"$ZIP_FILE\" -d \"$TARGET_DIR\""
65+
docker exec hostsvc-link bash -c "unzip -o \"${{ github.workspace }}/codeql/codeql.zip\" -d \"${{ github.workspace }}/codeql\""
7166
7267
echo "Clean up the zip file"
73-
docker exec hostsvc-link bash -c "rm \"$ZIP_FILE\""
74-
75-
echo "Optionally, add CodeQL CLI to PATH by adding it to .bashrc or .bash_profile"
76-
docker exec hostsvc-link bash -c "echo \"export PATH=\$PATH:$TARGET_DIR/codeql\" >> $HOME/.bashrc"
77-
docker exec hostsvc-link bash -c "source $HOME/.bashrc"
68+
docker exec hostsvc-link bash -c "rm \"${{ github.workspace }}/codeql/codeql.zip\""
7869
7970
echo "CodeQL CLI installation completed."
8071

0 commit comments

Comments
 (0)