Skip to content

Commit

Permalink
ci: add sync-files.yaml (#2)
Browse files Browse the repository at this point in the history
* ci: add sync-files.yaml

Signed-off-by: Kenji Miyake <[email protected]>

* chore(config): add .pre-commit-config.yaml

Signed-off-by: Kenji Miyake <[email protected]>

* chore: add build_depends.repos

Signed-off-by: Kenji Miyake <[email protected]>
  • Loading branch information
kenji-miyake authored Feb 21, 2022
1 parent faca06c commit 4127c60
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/sync-files.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
- repository: autowarefoundation/autoware
files:
- source: CODE_OF_CONDUCT.md
- source: CONTRIBUTING.md
- source: DISCLAIMER.md
- source: LICENSE
- source: .github/dependabot.yaml
- source: .github/workflows/pre-commit.yaml
- source: .github/workflows/pre-commit-optional.yaml
- source: .github/workflows/semantic-pull-request.yaml
- source: .github/workflows/spell-check-differential.yaml
- source: .markdown-link-check.json
- source: .markdownlint.yaml
- source: .pre-commit-config-optional.yaml
- source: .prettierignore
- source: .prettierrc.yaml
- source: .yamllint.yaml
- source: setup.cfg

- repository: autowarefoundation/autoware_common
files:
- source: .github/workflows/build-and-test.yaml
- source: .github/workflows/build-and-test-differential.yaml
- source: .github/workflows/check-build-depends.yaml
22 changes: 22 additions & 0 deletions .github/workflows/sync-files.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: sync-files

on:
schedule:
- cron: 0 19 * * * # run at 4 AM JST
workflow_dispatch:

jobs:
sync-files:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- name: Run sync-files
uses: autowarefoundation/autoware-github-actions/sync-files@tier4/proposal
with:
token: ${{ steps.generate-token.outputs.token }}
94 changes: 94 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
ci:
autofix_commit_msg: "ci(pre-commit): autofix"
autoupdate_commit_msg: "ci(pre-commit): autoupdate"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-xml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.30.0
hooks:
- id: markdownlint
args: [-c, .markdownlint.yaml, --fix]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
hooks:
- id: prettier

- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
hooks:
- id: yamllint

- repo: https://github.com/tier4/pre-commit-hooks-ros
rev: v0.4.0
hooks:
- id: prettier-xacro
- id: prettier-launch-xml
- id: prettier-package-xml
- id: sort-package-xml

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.3
hooks:
- id: shellcheck

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.4.2-1
hooks:
- id: shfmt
args: [-w, -s, -i=4]

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black
args: [--line-length=100]

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies:
[
flake8-blind-except,
flake8-builtins,
flake8-class-newline,
flake8-comprehensions,
flake8-deprecated,
flake8-docstrings,
flake8-import-order,
flake8-quotes,
]

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v13.0.0
hooks:
- id: clang-format

- repo: https://github.com/cpplint/cpplint
rev: 1.5.5
hooks:
- id: cpplint
args: [--quiet]
exclude: .cu

exclude: .svg
1 change: 1 addition & 0 deletions build_depends.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
repositories:

0 comments on commit 4127c60

Please sign in to comment.