diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..3930f07 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,27 @@ +name: Lint Code Base + +on: + push: + branches: master + paths: + - '**.sh' + pull_request: + branches: master + paths: + - '**.sh' +jobs: + build: + name: Lint Code Base + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + - name: Lint Code Base + uses: github/super-linter@v4 + env: + VALIDATE_ALL_CODEBASE: true + DEFAULT_BRANCH: master + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ce3595..5e6f337 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Allow extra arguments to restic-backup with `$RESTIC_BACKUP_EXTRA_ARGS`. - Add `$RESTIC_VERBOSITY_LEVEL` for debugging. - Assertion on all needed envionment variables in the backup and check scripts. +- Added linter (`shellcheck(1)`) that is run on push and PRs. ### Changed - **BREAKING CHANGE** renamed