Intial dockerized version of butler

Fix exec

cat -> echo

Push package

then
This commit is contained in:
Layla 2019-11-30 21:58:18 -05:00
parent e01a9949d8
commit 79d216d21a
3 changed files with 44 additions and 0 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM centos:8
LABEL "com.github.actions.name"="Butler Push"
LABEL "com.github.actions.description"="Publishes releases to Itch.io using Butler"
LABEL "com.github.actions.icon"="upload"
LABEL "com.github.actions.color"="white"
RUN yum update -y
# Install Butler
ADD https://dl.itch.ovh/butler/linux-amd64/head/butler /usr/bin/
RUN chmod +x /usr/bin/butler
# Run butler push
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

9
action.yml Normal file
View File

@ -0,0 +1,9 @@
name: "Butler Push"
description: "Publish releases to Itch.io using Butler"
author: josephbmanley
runs:
using: docker
image: Dockerfile
branding:
icon: upload
color: white

18
entrypoint.sh Normal file
View File

@ -0,0 +1,18 @@
#!/bin/sh
set -e
mkdir -p ~/.config/itch
echo $BUTLER_CREDENTIALS > ~/.config/itch/butler_creds
versionArguement=""
if [ "$VERSION" != "" ]
then
versionArguement="--userversion ${VERSION}"
elif [ "$VERSION_FILE" != "" ]
then
versionArguement="--userversion-file ${VERSION_FILE}"
fi
butler push $PACKAGE $ITCH_USER/$ITCH_GAME:$CHANNEL ${versionArguement}