Releases: finnp/create-file-action
Releases · finnp/create-file-action
2.0.0
This includes a number of community contributions.
The two liner
#!/bin/sh
echo $FILE_DATA > $FILE_NAME
now turned into a small script:
#!/bin/bash
if [ "$(dirname "$FILE_NAME")" != "." ]
then
mkdir -p "$(dirname "$FILE_NAME")"
fi
if [[ -z "${FILE_BASE64}" ]]; then
echo "Using FILE_DATA to write to $FILE_NAME"
echo $FILE_DATA > "$FILE_NAME"
else
echo "Using FILE_BASE64 to write to $FILE_NAME"
echo $FILE_BASE64 | base64 --decode > $FILE_NAME
fi
1.0.0
action "Create file" {
uses = "finnp/create-file-action@master"
env = {
FILE_NAME = "example.md"
FILE_DATA = "#Example file\nThis is an example"
}
}