Skip to content

Commit

Permalink
Ensure action forwards output
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Jun 26, 2020
1 parent 7249628 commit b03e4c7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,30 @@ jobs:
- "helm repo add WyriHaximusNet https://helm.wyrihaximus.net/"
- "helm repo add WyriHaximusNet https://helm.wyrihaximus.net/ && helm repo list "
- "helm plugin install https://github.com/hypnoglow/helm-s3.git"
- "helm plugin install https://github.com/hypnoglow/helm-s3.git && plugin list"
- "helm plugin install https://github.com/hypnoglow/helm-s3.git && helm plugin list"
- "helm env"
steps:
- uses: actions/checkout@v1
- run: sed -i "s/master/sha-${GITHUB_SHA}/g" Dockerfile
- uses: ./
env:
with:
exec: ${{ matrix.exec }}
kubeconfig: tada
kubeconfig: tada
tests-helm-output:
name: "Testing Helm Output"
needs:
- build-docker-image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: sed -i "s/master/sha-${GITHUB_SHA}/g" Dockerfile
- uses: ./
id: helm3
with:
exec: helm repo add WyriHaximusNet https://helm.wyrihaximus.net/
kubeconfig: tada
- run: |
php -r "echo '${HELM_OUTPUT}';"
php -r "exit('${HELM_OUTPUT}' == '"WyriHaximusNet" has been added to your repositories' ? 0 : 255);"
env:
HELM_OUTPUT: ${{ steps.helm3.outputs.helm_output }}
9 changes: 8 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ echo "${INPUT_EXEC}" > run.sh
chmod +x ./run.sh

echo -e "\033[36mExecuting helm\033[0m"
./run.sh
helm_output=$(./run.sh)
echo "$helm_output"

helm_output="${helm_output//'%'/'%25'}"
helm_output="${helm_output//$'\n'/'%0A'}"
helm_output="${helm_output//$'\r'/'%0D'}"

echo "::set-output name=helm_output::$helm_output"

echo -e "\033[36mCleaning up: \033[0m"
rm ./run.sh -Rf
Expand Down

0 comments on commit b03e4c7

Please sign in to comment.