-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (69 loc) · 2.13 KB
/
pull.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Pull actions
on:
pull_request:
permissions:
pull-requests: write
jobs:
validate:
runs-on: ubuntu-latest
name: Validate
steps:
- uses: actions/checkout@v4
- name: Faster HACS validation
if: "github.head_ref != 'release' || github.base_ref != 'main'"
uses: TheRealWaldo/[email protected]
with:
category: integration
ignore: brands wheels
- name: HACS validation
if: "github.ref == 'main' || (github.base_ref == 'main' && github.head_ref == 'release')"
uses: hacs/[email protected]
with:
category: integration
ignore: brands wheels
- name: Hassfest validation
uses: home-assistant/actions/hassfest@master
style:
runs-on: ubuntu-latest
name: Check style formatting
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node.js
uses: actions/[email protected]
with:
node-version: 14
- name: Install dependencies
run: npm ci
- name: Pull request linter action
uses: JulienKode/[email protected]
- name: Commit Linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: wagoid/[email protected]
- uses: actions/[email protected]
with:
python-version: "3.x"
- run: python3 -m pip install black
- run: black .
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
needs:
- style
- validate
permissions:
pull-requests: write
contents: write
steps:
- name: Fetch Dependabot Metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge for patches
if: ${{ steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr merge --auto --rebase --delete-branch "${{ github.event.pull_request.html_url }}"