diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c3d3be2..2f31e3c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,12 +6,13 @@ on: push: branches: - main - paths: + paths: &ci_paths - "docker-bake.hcl" - "**/Dockerfile*" - ".github/workflows/ci.yaml" pull_request: types: [opened, synchronize, reopened] + paths: *ci_paths concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000..f0419d5 --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,22 @@ +--- +name: pre-commit + +permissions: + id-token: write + contents: write + +on: + workflow_dispatch: + push: + branches: + - "main" + pull_request: + branches: + - "main" + +jobs: + pre-commit: + uses: devops-roast/github-actions/.github/workflows/pre-commit.yaml@main + with: + auto_commit: true + secrets: inherit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..d971dca --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,25 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: check-added-large-files + - id: check-merge-conflict + - id: end-of-file-fixer + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + - id: check-merge-conflict + - id: check-executables-have-shebangs + - id: check-case-conflict + - id: mixed-line-ending + + - repo: https://github.com/igorshubovych/markdownlint-cli + rev: v0.45.0 + hooks: + - id: markdownlint + + - repo: https://github.com/executablebooks/mdformat + rev: 0.7.22 + hooks: + - id: mdformat + additional_dependencies: + - mdformat-toc diff --git a/README.md b/README.md index e6374d8..02a3ca6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # containers + A collection of well-maintained container images diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..a546ddb --- /dev/null +++ b/mise.toml @@ -0,0 +1,2 @@ +[tools] +"pre-commit" = "4.1.0"