Skip to content

Commit

Permalink
chore: Update CI workflow to integrate commit type check with new out…
Browse files Browse the repository at this point in the history
…put env variable and fix superflous fi in check commit type
  • Loading branch information
loic-lb committed May 10, 2024
1 parent 093e980 commit e0d4a2a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:
COMMIT_MSG=$(git log --format=%B -n 1 ${{ github.event.after }})
COMMIT_TYPE=$(echo $COMMIT_MSG | cut -d' ' -f1)
echo "Commit type is '$COMMIT_TYPE'"
echo "::set-output name=type::$COMMIT_TYPE"
fi
echo "{type}={COMMIT_TYPE}" >> $GITHUB_OUTPUT
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -57,10 +56,10 @@ jobs:
SKIP_TYPES=("docs" "refactor" "style" "chore")
if [[ " ${SKIP_TYPES[@]} " =~ " ${COMMIT_TYPE} " ]]; then
echo "Skipping tests..."
echo "::set-output name=skip::true"
echo "{skip}={true}" >> $GITHUB_OUTPUT
else
echo "Running tests..."
echo "::set-output name=skip::false"
echo "{skip}={false}" >> $GITHUB_OUTPUT
fi
- name: Tests
if: steps.check-skip.outputs.skip != 'true'
Expand Down

0 comments on commit e0d4a2a

Please sign in to comment.