Skip to content

Commit

Permalink
Merge pull request #1230 from ErikJiang/fix_spray_ci
Browse files Browse the repository at this point in the history
fix get dockerfile commit is empty
  • Loading branch information
ErikJiang authored May 9, 2024
2 parents deb64fe + dedc0a1 commit db6cc95
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/call-build-imgs-for-spray.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ jobs:
SPRAY_SHA=${INPUTS_SPRAY_REF}
fi
echo image_tag_short_sha=$(echo ${SPRAY_SHA} | cut -c 1-7) >> $GITHUB_OUTPUT
echo dockerfile_commit=$(git log -1 --pretty=format:"%H" build/images/kubespray/Dockerfile) >> $GITHUB_OUTPUT
echo dockerfile_commit=$(curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${GITHUB_REPOSITORY}/commits?path=build/images/kubespray/Dockerfile \
|jq '.[0].sha' | tr -d '"') >> $GITHUB_OUTPUT
build-kubespray-image:
needs: output-variable
Expand Down

0 comments on commit db6cc95

Please sign in to comment.