[gh action] Release on tag push

This commit is contained in:
Nicolò Ribaudo
2019-07-20 16:39:10 +02:00
parent 3b4a86aea4
commit fb910e063c
6 changed files with 30 additions and 56 deletions

View 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"]

View 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