[gh action] Release on tag push
This commit is contained in:
16
.github/actions/commit-matches-branch/Dockerfile
vendored
Normal file
16
.github/actions/commit-matches-branch/Dockerfile
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM debian:stable-slim
|
||||
|
||||
LABEL "name"="commit-matches-branch"
|
||||
LABEL "version"="1.0.0"
|
||||
|
||||
LABEL "com.github.actions.name"="Commit matches branch"
|
||||
LABEL "com.github.actions.description"="Only continue the workflow if the current commit is the last commit of the given branch"
|
||||
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"]
|
||||
13
.github/actions/commit-matches-branch/entrypoint.sh
vendored
Normal file
13
.github/actions/commit-matches-branch/entrypoint.sh
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
current=$(git rev-parse HEAD)
|
||||
git checkout $1
|
||||
branch=$(git rev-parse HEAD)
|
||||
|
||||
if [ "$current" = "$branch" ]; then
|
||||
exit 0
|
||||
else
|
||||
exit 78
|
||||
fi
|
||||
Reference in New Issue
Block a user