Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Kseen715 committed Sep 22, 2024
1 parent 92e2b2e commit 30bfa2a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/on-commit-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# run on commit
name: CI
permissions:
contents: write

on:
push:
branches:
- dev
pull_request:
branches:
- dev
types: [opened, synchronize, reopened]
workflow_dispatch:

env:
TAG_VERSION: v0.0.0
PREVIOUS_TAG: 0.0.0
LATEST_TAG: 0.0.0
TOML_VERSION: 0.0.0

jobs:
fetch-commit-message:
runs-on: ubuntu-latest
outputs:
commit_message: ${{ steps.get_commit_message.outputs.message }}
steps:
- uses: actions/checkout@v4
- name: "Fetch commit message"
id: get_commit_message
run: echo "::set-output name=message::$(git log -1 --pretty=%B)"

check-no-ci:
runs-on: ubuntu-latest
needs: fetch-commit-message
outputs:
no_ci: ${{ steps.check_no_ci.outputs.no_ci }}
steps:
- name: "Check for [no_ci] in commit message"
id: check_no_ci
run: |
if echo "${{ needs.fetch-commit-message.outputs.commit_message }}" | grep -iq '\[no_ci\]'; then
echo "no_ci=true" >> $GITHUB_OUTPUT
else
echo "no_ci=false" >> $GITHUB_OUTPUT
fi
spellcheck:
runs-on: ubuntu-latest
needs: check-no-ci
if: needs.check-no-ci.outputs.no_ci == 'false'
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: Install codespell
shell: bash
run: |
sudo apt-get update || true
sudo apt-get install -y codespell
- name: Run Spellchecker
run: codespell --skip "./frontend/yarn.lock"
File renamed without changes.

0 comments on commit 30bfa2a

Please sign in to comment.