Skip to content

Commit 06aa6f1

Browse files
authored
Merge pull request #88 from a5chin/feature/pre-commit
Update pre-commit
2 parents 80da3e1 + 1fdf8f7 commit 06aa6f1

File tree

2 files changed

+41
-6
lines changed

2 files changed

+41
-6
lines changed

.github/workflows/publish-devcontainer.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
push:
55
branches: [main]
66
paths:
7-
- '.devcontainer/Dockerfile'
8-
- '.github/workflows/publish-devcontainer.yml'
7+
- ".devcontainer/Dockerfile"
8+
- ".github/workflows/publish-devcontainer.yml"
99
workflow_dispatch:
1010

1111
env:
@@ -18,18 +18,21 @@ jobs:
1818
permissions:
1919
contents: read
2020
packages: write
21-
21+
2222
steps:
2323
- name: Checkout repository
2424
uses: actions/checkout@v4
25+
2526
- name: Set up Docker Buildx
2627
uses: docker/setup-buildx-action@v3
28+
2729
- name: Log in to Container Registry
2830
uses: docker/login-action@v3
2931
with:
3032
registry: ${{ env.REGISTRY }}
3133
username: ${{ github.actor }}
32-
password: ${{ secrets.GITHUB_TOKEN }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
3336
- name: Extract metadata
3437
id: meta
3538
uses: docker/metadata-action@v5
@@ -38,7 +41,8 @@ jobs:
3841
tags: |
3942
type=ref,event=branch
4043
type=sha,prefix={{branch}}-
41-
type=raw,value=latest,enable={{is_default_branch}}
44+
type=raw,value=latest,enable={{is_default_branch}}
45+
4246
- name: Build and push devcontainer image
4347
uses: docker/build-push-action@v6
4448
with:

.pre-commit-config.yaml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,39 @@
11
default_stages: [pre-commit]
22

33
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v5.0.0
6+
hooks:
7+
- id: end-of-file-fixer
8+
name: End of file fixer
9+
description: "Ensure files end with a newline"
10+
11+
- id: check-json
12+
name: Check JSON
13+
description: "Check that JSON files are valid"
14+
15+
- id: check-toml
16+
name: Check TOML
17+
description: "Check that TOML files are valid"
18+
19+
- id: check-xml
20+
name: Check XML
21+
description: "Check that XML files are valid"
22+
23+
- id: check-yaml
24+
name: Check YAML
25+
description: "Check that YAML files are valid"
26+
27+
- id: detect-private-key
28+
name: Detect private key
29+
description: "Detect private keys in files"
30+
31+
- id: trailing-whitespace
32+
name: Trailing whitespace
33+
description: "Remove trailing whitespace from files"
34+
435
- repo: https://github.com/astral-sh/ruff-pre-commit
5-
rev: v0.9.2
36+
rev: v0.12.8
637
hooks:
738
- id: ruff
839
name: Ruff check

0 commit comments

Comments
 (0)