Skip to content

Commit

Permalink
fix: get git history to make tagging mechanic work properly
Browse files Browse the repository at this point in the history
actions/checkout by default retrieve only the last commit of the repository.
If we want the tagging mechanic to work properly we need the full history so we
can know the actual real last commit of the image directory when tagging

Signed-off-by: Antony Reynaud <[email protected]>
  • Loading branch information
Artyop authored and nebril committed Sep 6, 2024
1 parent 53113e8 commit e3a8a75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
echo "push=${PUSH}" >> $GITHUB_OUTPUT
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- uses: docker://quay.io/cilium/image-maker:e55375ca5ccaea76dc15a0666d4f57ccd9ab89de
name: Register binfmt from multi-platform builds
with:
Expand Down
2 changes: 1 addition & 1 deletion scripts/make-image-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ root_dir="$(git rev-parse --show-toplevel)"
cd "${root_dir}"

if [ "$#" -eq 1 ] ; then
# if one argument was given, assume it's a directory and obtain a tree hash
# if one argument was given, assume it's a directory and retrieve its last commit to generate a tag
image_dir="${1}"
if ! [ -d "${image_dir}" ] ; then
echo "${image_dir} is not a directory (path is relative to git root)"
Expand Down

0 comments on commit e3a8a75

Please sign in to comment.