Skip to content

Commit

Permalink
Added some debug for linux donload
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammedSentry committed Jun 13, 2024
1 parent 24a3a33 commit fa5d387
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout this repository
uses: actions/checkout@v4

- name: Download artifacts from MetricsHub
- name: Download artifact from MetricsHub
run: |
# Define variables
OWNER="${{ github.repository_owner }}"
OWNER="sentrysoftware"
REPO="metricshub"
BRANCH="main"
# Debug - Print variables
echo "Owner: $OWNER"
echo "Repo: $REPO"
echo "Branch: $BRANCH"
# Get the latest successful workflow run ID
WORKFLOW_RUNS=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/$OWNER/$REPO/actions/runs?branch=$BRANCH&status=completed&per_page=5")
WORKFLOW_RUNS=$(curl -s -H "Authorization: token ***" "https://api.github.com/repos/$OWNER/$REPO/actions/runs?branch=$BRANCH&status=completed&per_page=5")
RUN_ID=$(echo $WORKFLOW_RUNS | jq -r '.workflow_runs[] | select(.conclusion == "success") | .id' | head -n 1)
# Get the artifact download URL
ARTIFACTS_URL="https://api.github.com/repos/$OWNER/$REPO/actions/runs/$RUN_ID/artifacts"
Expand All @@ -52,7 +49,14 @@ jobs:
mkdir -p artifacts
unzip artifact.zip -d artifacts
cd artifacts
tar -xzf metricshub-linux-*.tar.gz
# Debug - List files in artifacts directory
echo "Files in artifacts directory:"
ls -l
# Extract tarball (assuming the correct filename is known)
TAR_FILE=$(ls metricshub-linux-*.tar.gz)
tar -xzf $TAR_FILE
- name: Run MetricsHub and get version
id: get_version
Expand Down

0 comments on commit fa5d387

Please sign in to comment.