Skip to content

Commit

Permalink
ubuntu24.04 ci pipeline fix
Browse files Browse the repository at this point in the history
Signed-off-by: shiva kumar <[email protected]>
  • Loading branch information
shivakunv committed Nov 22, 2024
1 parent 7c0b33a commit 03400b2
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/precompiled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,27 @@ jobs:
fi
echo "Listing all artifacts..."
gh api -X GET /repos/${{ github.repository }}/actions/artifacts --jq '.artifacts[] | .name'
current_branch="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
# Define variables for artifact pattern
PREFIX="kernel-version-${DRIVER_BRANCH}-${LTS_KERNEL}"
SUFFIX="${kernel_flavor}-${DIST}"
# Fetch all artifacts and filter based on name pattern
last_artifact=$(gh api -X GET /repos/${{ github.repository }}/actions/artifacts --jq \
'.artifacts[] | select(.name | startswith("'"$PREFIX"'") and endswith("'"$SUFFIX"'")) | {name: .name, created_at: .created_at} | @base64' | \
base64 --decode | jq -s 'sort_by(.created_at) | .[-1].name')
if [[ -n "$last_artifact" ]]; then
echo "Downloading artifact: $last_artifact"
gh run download --name "$last_artifact" --dir ./artifacts/
else
echo "No matching artifacts found for pattern: ${PREFIX}*${SUFFIX}"
fi
gh api -X GET /repos/${{ github.repository }}/actions/runs --jq '.workflow_runs[] | .head_branch'
# current_branch="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
current_branch="main"
echo "SHIVA $current_branch"
# Define variables for artifact pattern
PREFIX="kernel-version-${DRIVER_BRANCH}-${LTS_KERNEL}"
Expand Down

0 comments on commit 03400b2

Please sign in to comment.