Skip to content

Commit 5015bbe

Browse files
committed
Use direct Destructive Command Guard binary install
1 parent 0a52855 commit 5015bbe

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/destructive-command-guard.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,21 @@ jobs:
1515
- name: Checkout repository
1616
uses: actions/checkout@v4
1717

18+
- name: Install Destructive Command Guard
19+
shell: bash
20+
run: |
21+
set -euo pipefail
22+
version="v0.4.5"
23+
platform="x86_64-unknown-linux-gnu"
24+
install_dir="$RUNNER_TEMP/dcg"
25+
mkdir -p "$install_dir"
26+
curl --fail --location --silent --show-error \
27+
"https://github.com/Dicklesworthstone/destructive_command_guard/releases/download/${version}/dcg-${platform}.tar.xz" \
28+
--output "$install_dir/dcg.tar.xz"
29+
tar -xJf "$install_dir/dcg.tar.xz" -C "$install_dir"
30+
chmod +x "$install_dir/dcg"
31+
echo "$install_dir" >> "$GITHUB_PATH"
32+
1833
- name: Run Destructive Command Guard
19-
uses: Dicklesworthstone/destructive_command_guard/action@v0.4.5
20-
with:
21-
paths: .
22-
fail-on: error
23-
format: pretty
34+
shell: bash
35+
run: dcg scan --paths . --fail-on error --format pretty

0 commit comments

Comments
 (0)