-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(pre-commit): Format YAML files automatically
- Loading branch information
Showing
4 changed files
with
100 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
# Check for updated Rust packages | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: cargo | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
# Check for updated GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
--- | ||
name: Auto-merge Dependabot PR | ||
|
||
on: | ||
pull_request: | ||
pull_request: | ||
|
||
jobs: | ||
auto-merge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ahmadnassri/action-dependabot-auto-merge@v2 | ||
with: | ||
target: major | ||
github-token: ${{ secrets.mytoken }} | ||
auto-merge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ahmadnassri/action-dependabot-auto-merge@v2 | ||
with: | ||
target: major | ||
github-token: ${{ secrets.mytoken }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,41 @@ | ||
--- | ||
name: pre-commit | ||
|
||
on: | ||
push: | ||
pull_request: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Generate Cargo.lock | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: generate-lockfile | ||
- name: Generate Cargo.lock | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: generate-lockfile | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Detect code style issues | ||
uses: pre-commit/[email protected] | ||
env: | ||
SKIP: no-commit-to-branch | ||
- name: Detect code style issues | ||
uses: pre-commit/[email protected] | ||
env: | ||
SKIP: no-commit-to-branch | ||
|
||
- name: Generate patch file | ||
if: failure() | ||
run: | | ||
git diff-index -p HEAD > "${PATCH_FILE}" | ||
[ -s "${PATCH_FILE}" ] && echo "UPLOAD_PATCH_FILE=${PATCH_FILE}" >> "${GITHUB_ENV}" | ||
env: | ||
PATCH_FILE: pre-commit.patch | ||
- name: Generate patch file | ||
if: failure() | ||
run: | | ||
git diff-index -p HEAD > "${PATCH_FILE}" | ||
[ -s "${PATCH_FILE}" ] && echo "UPLOAD_PATCH_FILE=${PATCH_FILE}" >> "${GITHUB_ENV}" | ||
env: | ||
PATCH_FILE: pre-commit.patch | ||
|
||
- name: Upload patch artifact | ||
if: failure() && env.UPLOAD_PATCH_FILE != null | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.UPLOAD_PATCH_FILE }} | ||
path: ${{ env.UPLOAD_PATCH_FILE }} | ||
- name: Upload patch artifact | ||
if: failure() && env.UPLOAD_PATCH_FILE != null | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.UPLOAD_PATCH_FILE }} | ||
path: ${{ env.UPLOAD_PATCH_FILE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,54 @@ | ||
--- | ||
default_language_version: | ||
python: python3 | ||
python: python3 | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-case-conflict | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-toml | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: destroyed-symlinks | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: fix-byte-order-marker | ||
- id: forbid-new-submodules | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
exclude: ".tsv$" | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
args: [ | ||
--ignore-words=.codespellignore | ||
] | ||
exclude_types: [tsv, json] | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/doublify/pre-commit-rust | ||
rev: v1.0 | ||
hooks: | ||
- id: fmt | ||
args: [ | ||
--all, | ||
--, | ||
] | ||
- id: clippy | ||
args: [ | ||
--locked, | ||
--workspace, | ||
--all-features, | ||
--all-targets, | ||
--, | ||
-D, | ||
warnings, | ||
] | ||
- repo: https://github.com/Holzhaus/sourceheaders | ||
rev: v0.0.4 | ||
hooks: | ||
- id: sourceheaders | ||
- repo: https://github.com/jorisroovers/gitlint | ||
rev: v0.19.1 | ||
hooks: | ||
- id: gitlint | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-case-conflict | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-toml | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: destroyed-symlinks | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: fix-byte-order-marker | ||
- id: forbid-new-submodules | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
exclude: .tsv$ | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
args: [--ignore-words=.codespellignore] | ||
exclude_types: [tsv, json] | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt | ||
rev: 0.2.1 | ||
hooks: | ||
- id: yamlfmt | ||
- repo: https://github.com/doublify/pre-commit-rust | ||
rev: v1.0 | ||
hooks: | ||
- id: fmt | ||
args: [--all, --] | ||
- id: clippy | ||
args: [--locked, --workspace, --all-features, --all-targets, --, -D, warnings] | ||
- repo: https://github.com/Holzhaus/sourceheaders | ||
rev: v0.0.4 | ||
hooks: | ||
- id: sourceheaders | ||
- repo: https://github.com/jorisroovers/gitlint | ||
rev: v0.19.1 | ||
hooks: | ||
- id: gitlint | ||
|
||
ci: | ||
skip: [fmt, clippy] | ||
skip: [fmt, clippy] |