From c792c428c30412d1f1f23bbc83d497392b1c553b Mon Sep 17 00:00:00 2001 From: Kyle Taylor Date: Sat, 2 Nov 2024 23:11:13 -0500 Subject: [PATCH] Use outputs and step conditions --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index edfe28b..e32facd 100644 --- a/action.yml +++ b/action.yml @@ -71,6 +71,9 @@ runs: if: ${{ steps.restore-cache.outcome == 'success' }} shell: bash run: | + # Default to no session. + echo "session_found=false" >> $GITHUB_OUTPUT + # Verify that the encrypted session file was restored from cache. if [ ! -s "${{ steps.configure-cache.outputs.path }}" ]; then echo "No session file found in cache." @@ -91,10 +94,11 @@ runs: fi echo "Valid session found: $TERMINUS_USER" + echo "session_found=true" >> $GITHUB_OUTPUT - name: Authenticate Terminus id: authenticate - if: ${{ inputs.pantheon-machine-token && steps.decrypt.outcome != 'success' }} + if: ${{ inputs.pantheon-machine-token && steps.decrypt.outputs.session_found != 'true' }} shell: bash run: |