Skip to content

Commit

Permalink
Apply yamlfix and yamllint pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobkoziej committed Oct 22, 2023
1 parent cf8b773 commit 6bf7fc5
Show file tree
Hide file tree
Showing 29 changed files with 1,593 additions and 1,447 deletions.
9 changes: 6 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---

version: 2

updates:
- package-ecosystem: "pip"
directory: "/"
- package-ecosystem: pip
directory: /
schedule:
interval: "daily"
interval: daily
1 change: 1 addition & 0 deletions .github/workflows/mdbook-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

name: mdbook-deploy

# yamllint disable-line rule:truthy
on:
push:
branches:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

name: mdbook

# yamllint disable-line rule:truthy
on:
pull_request:
pull_request: ~

jobs:
build:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/node_bl.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
---

name: Build node_bl

# node_bl job triggers disabled for now while bootloader is under rework
# on: [pull_request, push, workflow_dispatch]
# yamllint disable-line rule:truthy
on: workflow_dispatch

jobs:
Expand Down Expand Up @@ -41,13 +44,13 @@ jobs:
- name: Build firmware
run: . .venv/bin/activate && make dbw/node_bl

- name: 'Upload CAN network'
- name: Upload CAN network
uses: actions/upload-artifact@v3
with:
name: can-dbc
path: build/can/igvc_can.dbc

- name: 'Upload firmware binaries'
- name: Upload firmware binaries
uses: actions/upload-artifact@v3
with:
name: node_bl-bin
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/node_fw.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---

name: Build node_fw

on: [pull_request, push, workflow_dispatch]
# yamllint disable-line rule:truthy
on:
- pull_request
- push
- workflow_dispatch

jobs:
pre_job:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

name: pre-commit

# yamllint disable-line rule:truthy
on:
pull_request:
push:
pull_request: ~
push: ~

jobs:
pre-commit:
Expand Down
72 changes: 39 additions & 33 deletions .github/workflows/sync-dev.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,53 @@
---

name: Sync `master` to `dev`

# yamllint disable-line rule:truthy
on:
push:
branches:
- master
- master

jobs:
make-sync-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create source branch
run: |
git config --global push.autoSetupRemote true
git checkout -b 'bot-branches/sync-master-dev-${{ github.sha }}'
git push
- uses: actions/checkout@v3
- name: Create source branch
run: |
git config --global push.autoSetupRemote true
git checkout -b 'bot-branches/sync-master-dev-${{ github.sha }}'
git push
- name: Make PR
id: make-pr
uses: repo-sync/pull-request@v2
with:
source_branch: 'bot-branches/sync-master-dev-${{ github.sha }}'
destination_branch: dev
github_token: ${{ secrets.BOT_PAT_SELFDRIVE }}
pr_title: '[SYNC-FIX] Merge out-of-sync changes from \`master\` into \`dev\`:grey_exclamation:'
pr_body: |
Hello! This PR has been automatically generated because you need to merge out-of-sync changes from \`master\` into \`dev\`.
- name: Make PR
id: make-pr
uses: repo-sync/pull-request@v2
with:
source_branch: bot-branches/sync-master-dev-${{ github.sha }}
destination_branch: dev
github_token: ${{ secrets.BOT_PAT_SELFDRIVE }}
pr_title: >
'[SYNC-FIX] Merge out-of-sync changes from \`master\` into
\`dev\`:grey_exclamation:'
pr_body: >
Hello! This PR has been automatically generated because you need to
merge out-of-sync changes from \`master\` into \`dev\`.
**I will try to merge this PR on my own!**
pr_label: 'autosync,URGENT'
pr_allow_empty: true
**I will try to merge this PR on my own!**
pr_label: autosync,URGENT
pr_allow_empty: true

- name: Set automerge
if: ${{ steps.make-pr.outputs.pr_number != '' }}
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.BOT_PAT_SELFDRIVE }}
pull-request-number: ${{ steps.make-pr.outputs.pr_number }}
merge-method: merge
- name: Set automerge
if: ${{ steps.make-pr.outputs.pr_number != '' }}
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.BOT_PAT_SELFDRIVE }}
pull-request-number: ${{ steps.make-pr.outputs.pr_number }}
merge-method: merge

- name: Approve PR
if: ${{ steps.make-pr.outputs.pr_number != '' }}
uses: hmarr/auto-approve-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # approve as GH Actions
pull-request-number: ${{ steps.make-pr.outputs.pr_number }}
- name: Approve PR
if: ${{ steps.make-pr.outputs.pr_number != '' }}
uses: hmarr/auto-approve-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # approve as GH Actions
pull-request-number: ${{ steps.make-pr.outputs.pr_number }}
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ repos:
rev: 0.7.17
hooks:
- id: mdformat
args: [--wrap, '72']
args:
- --wrap
- '72'
exclude: LICENSE\.md
additional_dependencies:
- mdformat-gfm
Expand Down
Loading

0 comments on commit 6bf7fc5

Please sign in to comment.