diff --git a/.github/workflows/bats-tests.yml b/.github/workflows/bats-tests.yml index b85eb3d..4d3f1f5 100644 --- a/.github/workflows/bats-tests.yml +++ b/.github/workflows/bats-tests.yml @@ -14,7 +14,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + - name: Set up Git configurations + run: | + git config --global user.name "CI User" + git config --global user.email "ci@example.com" - name: Set up Git run: | @@ -22,9 +27,7 @@ jobs: sudo apt-get install -y git - name: Install Bats - run: | - git clone --depth=1 https://github.com/bats-core/bats-core.git /usr/local/bats - /usr/local/bats/install.sh /usr/local + run: sudo apt-get install bats - name: Run Bats tests run: | diff --git a/README.md b/README.md index 154bb48..d67ce9c 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,17 @@ Create a commit prefixed with the current branch name. +[![Bats Tests](https://github.com/sbimochan/smart-commit/actions/workflows/bats-tests.yml/badge.svg)](https://github.com/sbimochan/smart-commit/actions/workflows/bats-tests.yml) + [Story](https://www.lftechnology.com/blog/git-workflow-smart-commit/) behind Smart Commit. :zap: + ## Installation Run this command on terminal. ```shell -sudo curl https://raw.githubusercontent.com/sbimochan/smart-commit/master/commit -o /usr/local/bin/commit && sudo chmod +x /usr/local/bin/commit +sudo curl https://raw.githubusercontent.com/sbimochan/smart-commit/main/commit -o /usr/local/bin/commit && sudo chmod +x /usr/local/bin/commit ``` ## Usage @@ -38,7 +41,7 @@ sudo curl https://raw.githubusercontent.com/sbimochan/smart-commit/master/commit ## Skip Branches -To add a custom branch that you would like to skip, create a `.smart-commit-ignore` file in your top level directory. A `.smart-commit-ignore` file looks like [this](https://github.com/sbimochan/smart-commit/blob/master/.smart-commit-ignore). +To add a custom branch that you would like to skip, create a `.smart-commit-ignore` file in your top level directory. A `.smart-commit-ignore` file looks like [this](https://github.com/sbimochan/smart-commit/blob/main/.smart-commit-ignore). Additionally, you might want to add `.smart-commit-ignore` to your `.gitignore` file.