Skip to content

Commit

Permalink
fix: find the nearest tag for workflow updates (#33)
Browse files Browse the repository at this point in the history
# Description

The `head` of the default branch might not be tagged, i.e. `ci` commit,
... We now find the latest tag in the commit history to be able to
create the comment when updating the workflows.

# Verification

Locally.
  • Loading branch information
kayman-mk authored May 23, 2024
1 parent e84d7e6 commit f36da8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion update-workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ do

# add a reference to this repository which holds the workflow
commit_sha=$(git rev-parse HEAD)
tag=$(git describe --tags --exact-match 2>/dev/null || true)
tag=$(git describe --tags "$(git rev-list --tags --max-count=1)" || true)

file_to_include="uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/$base_name@$commit_sha # $tag"

Expand Down

0 comments on commit f36da8a

Please sign in to comment.