diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e1b2ae63..2b2b0ead 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,6 +9,8 @@ updates: directory: "/" schedule: interval: "weekly" + cooldown: + default-days: 7 open-pull-requests-limit: 10 groups: actions: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 104ce5b9..27560dab 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -4,6 +4,8 @@ on: push: branches: [main] pull_request: + # edited: check the PR title again after it is changed + types: [opened, synchronize, reopened, edited] branches: [main] permissions: {} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b224df2..a1bfaf1b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,6 @@ name: Release on: release: - branches: [main] types: [released] workflow_dispatch: inputs: diff --git a/.github/workflows/self-test.yml b/.github/workflows/self-test.yml index 6ffeee1e..c3a6130e 100644 --- a/.github/workflows/self-test.yml +++ b/.github/workflows/self-test.yml @@ -73,12 +73,17 @@ jobs: extra-args: -std=c++14 -Wall - name: Fail fast?! - # if: steps.linter.outputs.checks-failed > 0 + # if: ${{ !contains(fromJSON('["0", ""]'), steps.linter.outputs.checks-failed) }} + shell: bash + env: + CHECKS_FAILED: ${{ steps.linter.outputs.checks-failed }} + TIDY_CHECKS_FAILED: ${{ steps.linter.outputs.clang-tidy-checks-failed }} + FORMAT_CHECKS_FAILED: ${{ steps.linter.outputs.clang-format-checks-failed }} run: | echo "some linter checks failed" - echo "total checks-failed: ${{ steps.linter.outputs.checks-failed }}" - echo "clang-tidy checks-failed: ${{ steps.linter.outputs.clang-tidy-checks-failed }}" - echo "clang-format checks-failed: ${{ steps.linter.outputs.clang-format-checks-failed }}" + echo "total checks-failed: $CHECKS_FAILED" + echo "clang-tidy checks-failed: $TIDY_CHECKS_FAILED" + echo "clang-format checks-failed: $FORMAT_CHECKS_FAILED" # for actual deployment # run: exit 1 @@ -127,6 +132,8 @@ jobs: step-summary: false - name: Assert auto-fix committed the formatting changes + env: + FORMAT_CHECKS_FAILED: ${{ steps.linter.outputs.clang-format-checks-failed }} run: | set -euo pipefail @@ -164,7 +171,7 @@ jobs: exit 1 fi - failed='${{ steps.linter.outputs.clang-format-checks-failed }}' + failed="$FORMAT_CHECKS_FAILED" if [ "${failed:-0}" != "0" ]; then echo "::error title=auto-fix::clang-format still reports $failed issue(s) after auto-fix" exit 1