Added many, many more actions.

This commit is contained in:
2025-06-24 15:24:16 -07:00
parent 62fbe4dead
commit 57ef232d2b
108 changed files with 4212 additions and 7 deletions

8
renpy/renpy/Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
# Container image that runs your code
FROM maienm/renpy:8.1.0
ENV RENPY_HOME="/opt/renpy/"
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

21
renpy/renpy/action.yaml Normal file
View File

@@ -0,0 +1,21 @@
name: renpy
description: "Run RenPy commands."
inputs:
command:
description: "Arguments to pass into RenPy."
required: true
catchErrors:
description: "Whether or not errors should be handled."
required: false
outputs:
console:
description: "The console output of the RenPy command."
exitCode:
description: "How the program exited."
runs:
using: docker
image: Dockerfile
env:
CATCH_ERRORS: ${{ inputs.catchErrors }}
args:
- ${{ inputs.command }}

27
renpy/renpy/entrypoint.sh Normal file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
ARGS="$@"
set -o pipefail
exec 5>&1
OUTPUT=$(bash -c "$RENPY_HOME/renpy.sh $RENPY_HOME/launcher $ARGS" | tee /dev/fd/5)
RESULT=$?
#Output multiline strings.
#https://trstringer.com/github-actions-multiline-strings/
# if [[ -n "$OUTPUT" ]]; then
# echo "console<<EOF" >> "$GITHUB_OUTPUT"
# echo "$OUTPUT" >> "$GITHUB_OUTPUT"
# echo "EOF" >> "$GITHUB_OUTPUT"
# fi
if [[ -n "$OUTPUT" ]]; then
OUTPUT="${OUTPUT//'%'/'%25'}"
OUTPUT="${OUTPUT//$'\n'/'%0A'}"
OUTPUT="${OUTPUT//$'\r'/'%0D'}"
echo "::set-output name=console::$OUTPUT"
fi
echo "exitCode=$RESULT" >> "$GITHUB_OUTPUT"
if [[ "$CATCH_ERRORS" != "true" ]]; then
exit $RESULT
fi