Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ jobs:
if [[ -n "$MANUAL_TAG" ]]; then
tag="$MANUAL_TAG"
echo "Using manual tag override: $tag"
elif [[ "$subject" =~ ^Update[[:space:]]+([a-z0-9][a-z0-9-]*)[[:space:]]+to[[:space:]]+([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
elif [[ "$subject" =~ ^Update[[:space:]]+([a-z0-9][a-z0-9-]*)[[:space:]]+to[[:space:]]+([0-9]+\.[0-9]+\.[0-9]+)([[:space:]]+\(#[0-9]+\))?$ ]]; then
tag="${BASH_REMATCH[1]}/v${BASH_REMATCH[2]}"
echo "Derived tag from commit subject: $tag"
else
echo "Commit subject does not match 'Update <image> to <version>'; no tag will be created: $subject"
echo "Commit subject does not match 'Update <image> to <version> [(#PR)]'; no tag will be created: $subject"
echo "create=false" >> "$GITHUB_OUTPUT"
exit 0
fi
Expand Down Expand Up @@ -98,14 +98,12 @@ jobs:
run: |
set -euo pipefail

existing_sha="$(
if existing_sha="$(
gh api \
"repos/${GITHUB_REPOSITORY}/git/ref/tags/${TAG}" \
--jq '.object.sha' \
2>/dev/null || true
)"

if [[ -n "$existing_sha" ]]; then
2>/dev/null
)"; then
if [[ "$existing_sha" == "$GITHUB_SHA" ]]; then
echo "Tag $TAG already points to $GITHUB_SHA; nothing to do"
exit 0
Expand Down
6 changes: 3 additions & 3 deletions docs/PROJECT.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ Images are released independently from tags in this form:
<tool>/v<version>
```

A push to `main` whose commit subject exactly matches
`Update <tool> to <version>` creates the corresponding release tag. For
example:
A push to `main` whose commit subject matches `Update <tool> to <version>`,
optionally followed by GitHub's squash-merge suffix ` (#<pull-request>)`,
creates the corresponding release tag. For example:

<!-- tiny-cli-images:version:age:start -->

Expand Down