diff --git a/.github/workflows/append-changelog.yml b/.github/workflows/append-changelog.yml index be984cb..574fe35 100644 --- a/.github/workflows/append-changelog.yml +++ b/.github/workflows/append-changelog.yml @@ -1,7 +1,6 @@ name: Append changelog for new release on: - workflow_dispatch: inputs: version: @@ -9,13 +8,10 @@ on: required: true jobs: - append-changelog: runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Write changelog run: | @@ -49,7 +45,7 @@ jobs: rm -fv CHANGELOG.md.bak - name: Commit & push changes - uses: EndBug/add-and-commit@v8 + uses: EndBug/add-and-commit@v9 with: author_name: github-actions[bot] author_email: github-actions[bot]@users.noreply.github.com diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 7bb15a0..c6c2d2d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,29 +1,45 @@ -name: Check +name: Markdown Lint & Spellcheck on: workflow_dispatch: push: + branches: + - '**' paths: - 'CHANGELOG.md' + - '.markdownlint.json' - '.aspell.*.pws' jobs: markdownlint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: DavidAnson/markdownlint-cli2-action@v9 + - uses: actions/checkout@v4 + - uses: DavidAnson/markdownlint-cli2-action@v16 with: globs: 'CHANGELOG.md' - spellchecker: + + spellcheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup aspell - run: sudo apt-get -y update && sudo apt-get -y install aspell aspell-en + run: | + sudo apt-get -y update + sudo apt-get -y install aspell aspell-en - name: Run spellchecker run: | - SPELLCHECK_OUT=$(cat CHANGELOG.md \ - | aspell --lang=en --encoding=utf-8 --personal=./.aspell.en.pws list) - echo $SPELLCHECK_OUT - test $(echo -n $SPELLCHECK_OUT | wc -c) -eq 0 + set -eux + temp=$(mktemp) + cat CHANGELOG.md \ + | aspell \ + --lang=en \ + --encoding=utf-8 \ + --personal=./.aspell.en.pws \ + list \ + | sort -u \ + > $temp + if [ -s $temp ]; then + cat $temp + exit 1 + fi diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index 9841bf4..2bce3ac 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -3,21 +3,16 @@ name: Update submodules on: workflow_dispatch jobs: - update-submodules: runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.PUSH_TOKEN }} - - name: Update submodules recursively run: | git submodule update --init --recursive git submodule update --recursive --remote - - name: Commit & push changes run: | git config --global user.name 'github-actions[bot]'