Skip to content

Commit 7bef1f0

Browse files
committed
fix: use gh release download instead of CI artifact
1 parent f45e6c5 commit 7bef1f0

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

.github/workflows/clens.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
required: true
88
type: string
99
description: 'Tool to run: aws-inventory, iam-audit, cost-report, security-audit, unused-resources, tag-compliance, service-quotas, or all'
10+
version:
11+
required: false
12+
type: string
13+
default: 'latest'
14+
description: 'Clens release version to use (e.g. v1.0.0). Defaults to latest.'
1015
api_host:
1116
required: false
1217
type: string
@@ -68,19 +73,11 @@ jobs:
6873
env:
6974
GH_TOKEN: ${{ github.token }}
7075
run: |
71-
RUN_ID=$(gh run list \
72-
--repo clouddrove/clens-client \
73-
--workflow ci.yml \
74-
--status success \
75-
--limit 1 \
76-
--json databaseId \
77-
-q '.[0].databaseId')
78-
gh run download "$RUN_ID" \
76+
gh release download ${{ inputs.version }} \
7977
--repo clouddrove/clens-client \
80-
--name clens-linux-amd64 \
78+
--pattern 'clens-linux-amd64' \
8179
-D ./bin
82-
mv ./bin/clens-linux-amd64 ./clens
83-
chmod +x ./clens
80+
chmod +x ./bin/clens-linux-amd64
8481
8582
- name: 🚀 Run clens
8683
env:
@@ -97,7 +94,7 @@ jobs:
9794
if [ -n "$API_TOKEN" ]; then
9895
ARGS="$ARGS -api-token $API_TOKEN"
9996
fi
100-
./clens $ARGS
97+
./bin/clens-linux-amd64 $ARGS
10198
10299
- name: 📤 Upload report artifacts
103100
if: always()

0 commit comments

Comments
 (0)