Skip to content

Commit ff0ecaf

Browse files
committed
Enhance Linux dependency installation by adding quiet mode to apt-get commands and checking for Microsoft repository before installation
1 parent 0b47c1e commit ff0ecaf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
echo "Installing Linux dependencies for PowerShell DSC..."
7070
7171
# Update package list
72-
sudo apt-get update
72+
sudo apt-get update -qq
7373
7474
# Check if Microsoft repository is already added, if not add it
7575
if ! grep -q "packages.microsoft.com" /etc/apt/sources.list /etc/apt/sources.list.d/* 2>/dev/null; then
@@ -82,22 +82,22 @@ jobs:
8282
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/microsoft-ubuntu-${DISTRO_CODENAME}-prod ${DISTRO_CODENAME} main" | sudo tee "/etc/apt/sources.list.d/microsoft-${DISTRO_CODENAME}-prod.list" >/dev/null
8383
8484
# Update package list again after adding the new repo
85-
sudo apt-get update
85+
sudo apt-get update -qq
8686
else
8787
echo "Microsoft repository already configured, skipping..."
8888
fi
8989
9090
# Install OMI (Open Management Infrastructure) which provides libmi
9191
if apt-cache policy omi 2>/dev/null | grep -q 'Candidate:'; then
92-
if ! sudo apt-get install -y omi; then
92+
if ! sudo apt-get install -y -qq omi; then
9393
echo "WARNING: 'omi' package failed to install; continuing."
9494
fi
9595
else
9696
echo "Package 'omi' not found in repositories; skipping OMI install."
9797
fi
9898
9999
# Also install other dependencies that might be needed
100-
sudo apt-get install -y libc6-dev libssl-dev
100+
sudo apt-get install -y -qq libc6-dev libssl-dev
101101
102102
# Set LD_LIBRARY_PATH permanently for the runner session
103103
echo "LD_LIBRARY_PATH=/opt/omi/lib:/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH}" >> $GITHUB_ENV

0 commit comments

Comments
 (0)