Skip to content

Commit

Permalink
Use outputs and step conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
kyletaylored authored Nov 3, 2024
1 parent e370fc2 commit c792c42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand All @@ -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: |
Expand Down

0 comments on commit c792c42

Please sign in to comment.