-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a new release after a v*.*.* commit instead of the tag (#9470)
* Create a new release after a v*.*.* commit instead of the tag * Fix bugs * Avoid matching things like "v2"
- Loading branch information
1 parent
83cbc11
commit b25fea4
Showing
4 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM debian:stable-slim | ||
|
||
LABEL "name"="filter" | ||
LABEL "version"="1.1.0" | ||
|
||
LABEL "com.github.actions.name"="Filter commit message" | ||
LABEL "com.github.actions.description"="Stop a workflow if the message of the current commit doesn't match the pattern" | ||
LABEL "com.github.actions.icon"="filter" | ||
LABEL "com.github.actions.color"="gray-dark" | ||
|
||
ADD entrypoint.sh /action/entrypoint.sh | ||
|
||
RUN chmod +x /action/entrypoint.sh | ||
RUN apt-get update && apt-get install -y --no-install-recommends git | ||
|
||
ENTRYPOINT ["/action/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
pattern=$1 | ||
message=$(git log --oneline --format=%B -1 $GITHUB_SHA) | ||
|
||
if echo "$message" | grep -Pq "$pattern"; then | ||
echo "INFO: $message matches $pattern" | ||
exit 0 | ||
else | ||
echo "INFO: $message does not match $pattern" | ||
# 78 is the "neutral" exit status | ||
exit 78 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters