Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Commit

Permalink
Another way
Browse files Browse the repository at this point in the history
  • Loading branch information
mstachniuk committed Nov 24, 2020
1 parent ab4beca commit b66bde5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
10 changes: 8 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@ inputs:
outputs:
ci-skip:
description: 'The output ci-skip with the value true/false, default: false'
value: 'false'
value: ${{ steps.set-outputs-step.outputs.skip }}
ci-skip-not:
description: 'The output ci-skip-not with the value true/false, default: true'
value: 'true'
value: ${{ steps.set-outputs-step.outputs.skip-not }}
runs:
using: "composite"
steps:
- run: $GITHUB_ACTION_PATH/script.sh "${{ inputs.fail-fast }}" "${{ inputs.exit-code }}" "${{ inputs.commit-filter }}" "${{ inputs.commit-filter-separator }}"
shell: bash
- id: set-outputs-step
run: |
echo "::set-output name=skip::${{ CI_SKIP }}"
echo "::set-output name=skip-not::${{ CI_SKIP_NOT }}"
shell: bash

9 changes: 4 additions & 5 deletions script.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
set -x

fail_fast=$1
exit_code=$2
Expand Down Expand Up @@ -30,8 +29,8 @@ if [[ "$total_filter_count" -eq 0 ]]; then
echo "CI_SKIP_NOT=true"
echo "CI_SKIP=false" >> $GITHUB_ENV
echo "CI_SKIP_NOT=true" >> $GITHUB_ENV
echo "::set-output name=ci-skip::false"
echo "::set-output name=ci-skip-not::true"
# echo "::set-output name=ci-skip::false"
# echo "::set-output name=ci-skip-not::true"
echo "And continue..."
else
if [[ $fail_fast == 'true' ]]; then
Expand All @@ -44,8 +43,8 @@ else
echo "CI_SKIP_NOT=false"
echo "CI_SKIP=true" >> $GITHUB_ENV
echo "CI_SKIP_NOT=false" >> $GITHUB_ENV
echo "::set-output name=ci-skip::true"
echo "::set-output name=ci-skip-not::false"
# echo "::set-output name=ci-skip::true"
# echo "::set-output name=ci-skip-not::false"
echo "And continue..."
fi
fi

0 comments on commit b66bde5

Please sign in to comment.