-
-
Notifications
You must be signed in to change notification settings - Fork 6
38 lines (35 loc) · 998 Bytes
/
Copy pathhacs-integration.yml
File metadata and controls
38 lines (35 loc) · 998 Bytes
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
name: HACS Action
on:
workflow_dispatch:
push:
pull_request:
pull_request_target:
permissions:
contents: read
checks: write
pull-requests: write
statuses: write
jobs:
hacs:
name: HACS Action
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- name: HACS Action
uses: "hacs/action@main"
with:
category: "integration"
- name: Report HACS Status
if: always()
uses: actions/github-script@v7
with:
script: |
const conclusion = '${{ job.status }}'.toLowerCase();
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha,
state: conclusion === 'success' ? 'success' : 'failure',
description: conclusion === 'success' ? 'HACS validation passed!' : 'HACS validation failed.',
context: 'HACS Validation'
});