Skip to content

Commit

Permalink
fix(CI): do not set default action var outputs
Browse files Browse the repository at this point in the history
Signed-off-by: Cameron Smith <[email protected]>
  • Loading branch information
cameronraysmith committed Dec 3, 2023
1 parent ae92358 commit 1f65b3f
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,31 +58,39 @@ jobs:
mode: ${{ steps.set-variables.outputs.mode }}

steps:
- id: set-variables
- name: Set action variables
id: set-variables
run: |
DEBUG="false"
MODE="prod"
SKIP_CI="false"
SKIP_TESTS="false"
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
DEBUG="${{ github.event.inputs.debug_enabled }}"
MODE="${{ github.event.inputs.workflow_execution_mode }}"
fi
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
if ${{ contains(github.event.pull_request.labels.*.name, 'skip-ci') }}; then
SKIP_CI="true"
else
SKIP_CI="false"
fi
if ${{ contains(github.event.pull_request.labels.*.name, 'skip-tests') }}; then
SKIP_TESTS="true"
else
SKIP_TESTS="false"
fi
if ${{ contains(github.event.pull_request.labels.*.name, 'actions-debug') }}; then
DEBUG="true"
else
DEBUG="false"
fi
fi
if ${{ contains(github.event.pull_request.labels.*.name, 'workflow-mode-dev') }}; then
MODE="dev"
else
MODE="prod"
fi
else
DEBUG="false"
MODE="prod"
SKIP_CI="false"
SKIP_TESTS="false"
fi
echo "DEBUG=$DEBUG"
Expand Down

0 comments on commit 1f65b3f

Please sign in to comment.