env/entrypoint.sh

18 lines
718 B
Bash
Raw Permalink Normal View History

2020-02-11 04:30:39 -05:00
#!/bin/sh -l
GITHUB_REPOSITORY_OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f 1)
echo "::set-env name=GITHUB_REPOSITORY_OWNER::$GITHUB_REPOSITORY_OWNER"
echo "Set GITHUB_REPOSITORY_OWNER=$GITHUB_REPOSITORY_OWNER"
GITHUB_REPOSITORY_NAME=$(echo $GITHUB_REPOSITORY | cut -d'/' -f 2)
echo "::set-env name=GITHUB_REPOSITORY_NAME::$GITHUB_REPOSITORY_NAME"
echo "Set GITHUB_REPOSITORY_NAME=$GITHUB_REPOSITORY_NAME"
GITHUB_REF_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
echo "::set-env name=GITHUB_REF_NAME::$GITHUB_REF_NAME"
echo "Set GITHUB_REF_NAME=$GITHUB_REF_NAME"
GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c1-8)
echo "::set-env name=GITHUB_SHA_SHORT::$GITHUB_SHA_SHORT"
echo "Set GITHUB_SHA_SHORT=$GITHUB_SHA_SHORT"