Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add github wf #2

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Cron actions

on:
schedule:
- cron: "0 0 * * *"

jobs:
validate:
runs-on: "ubuntu-latest"
name: Validate
steps:
- uses: "actions/checkout@v4"

- name: HACS validation
uses: "hacs/action@main"
with:
category: "integration"
ignore: brands

- name: Hassfest validation
uses: "home-assistant/actions/hassfest@master"
47 changes: 47 additions & 0 deletions .github/workflows/pr-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: PR artifacts

on:
pull_request:
branches:
- main

jobs:
create:
permissions:
# Required to upload/save artifact, otherwise you'll get
# "Error: Resource not accessible by integration"
contents: write
# Required to post comment, otherwise you'll get
# "Error: Resource not accessible by integration"
pull-requests: write

runs-on: ubuntu-latest
steps:
- name: 📥 Checkout the repository
uses: actions/checkout@v4

- name: 📦 Create zip file for the integration
run: |
cd "${{ github.workspace }}/custom_components/bticino_x8000"
zip bticino_x8000.zip -r ./
mv bticino_x8000.zip "${{ github.workspace }}/"

- name: 📤 Create comment with the artifiactory
uses: gavv/pull-request-artifacts@v2
with:
# Commit hash that triggered PR
commit: ${{ github.event.pull_request.head.sha }}

# Token for current repo (used to post PR comment)
repo-token: ${{ secrets.GITHUB_TOKEN }}

artifacts-branch: artifacts

comment-title: |
🤖 Pull request artifactsy

For testing please download the zip file below and extract it in `[config folder]/custom_components/bticino_x8000`.

# Whitespace-separated list of files to upload
artifacts: |
bticino_x8000.zip
Loading