-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
729bbd8
commit 7dba03f
Showing
13 changed files
with
1,870 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
--- | ||
channel: stable | ||
addons: | ||
laskakit-data-feeder: | ||
repository: radoslavirha/ha-addons | ||
target: addons/laskakit-data-feeder | ||
image: radoslavirha/ha-addon-laskakit-data-feeder-{arch} | ||
image: radoslavirha/ha-addon-laskakit-data-feeder-{arch} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Radoslav's Home Assistant Add-on Repository Updater | ||
description: Tool for updating Home Assistant Add-on repository. | ||
|
||
inputs: | ||
TOKEN: | ||
description: GitHub token that is allowed to write/commit to the target repo | ||
required: true | ||
ADDON: | ||
description: Slug of the add-on to update the repository for | ||
required: false | ||
FORCE: | ||
description: Force repository update, even if no changes are detected | ||
default: "false" | ||
required: false | ||
|
||
runs: | ||
using: docker | ||
image: ../../../action/Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: CI | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint-yaml: | ||
name: YAML lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Run YAML lint | ||
uses: frenck/[email protected] | ||
with: | ||
strict: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
--- | ||
name: Repository Update | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
ADDON: | ||
description: Addon name | ||
required: true | ||
default: laskakit-data-feeder | ||
type: string | ||
FORCE: | ||
description: Whether to update all add-ons | ||
required: false | ||
default: false | ||
type: boolean | ||
repository_dispatch: | ||
types: ["update"] | ||
|
||
jobs: | ||
updater: | ||
name: Running updater for ${{ github.event.client_payload.addon }} | ||
name: Running updater for ${{ github.event.client_payload.addon || github.event.inputs.ADDON }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Running updater for ${{ github.event.client_payload.addon }} | ||
run: echo ${{ github.event.client_payload.addon }} | ||
# - name: 🚀 Run Repository Updater | ||
# uses: hassio-addons/repository-updater@v1 | ||
# with: | ||
# # addon: ${{ github.event.client_payload.addon }} | ||
# addon: laskakit-data-feeder | ||
# repository: ${{ github.repository }} | ||
# token: ${{ secrets.UPDATER_TOKEN }} | ||
|
||
# workflows: | ||
# uses: hassio-addons/workflows/.github/workflows/repository-updater.yaml@main | ||
# secrets: | ||
# UPDATER_TOKEN: ${{ secrets.UPDATER_TOKEN }} | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Running updater for ${{ github.event.client_payload.addon || github.event.inputs.ADDON }} | ||
run: echo ${{ github.event.client_payload.addon || github.event.inputs.ADDON }} | ||
- name: Running updater for ${{ github.event.client_payload.addon || github.event.inputs.ADDON }} | ||
uses: ./.github/actions/repository-updater | ||
with: | ||
TOKEN: ${{ secrets.UPDATER_TOKEN }} | ||
ADDON: ${{ github.event.client_payload.addon || github.event.inputs.ADDON }} | ||
FORCE: ${{ github.event.inputs.FORCE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
extends: default | ||
|
||
ignore: | ||
- action/pnpm-lock.yaml | ||
|
||
rules: | ||
line-length: | ||
max: 130 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"sourceMaps": false, | ||
"jsc": { | ||
"parser": { | ||
"syntax": "typescript", | ||
"decorators": true, | ||
"dynamicImport": true | ||
}, | ||
"target": "es2022", | ||
"externalHelpers": true, | ||
"keepClassNames": true, | ||
"transform": { | ||
"useDefineForClassFields": false, | ||
"legacyDecorator": true, | ||
"decoratorMetadata": true | ||
} | ||
}, | ||
"module": { | ||
"type": "es6" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM node:22-slim | ||
|
||
RUN corepack enable pnpm | ||
|
||
COPY . . | ||
|
||
RUN pnpm install --prod --frozen-lockfile && \ | ||
pnpm build && \ | ||
chmod a+x ./entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
ls action | ||
# action is directory where the action code is present | ||
exec pnpm -C action start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "action", | ||
"version": "1.0.0", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"build": "swc src --out-dir dist -s --strip-leading-paths", | ||
"start": "cross-env NODE_ENV=production node --import @swc-node/register/esm-register dist/index.js" | ||
}, | ||
"dependencies": { | ||
"@actions/core": "^1.11.1", | ||
"@actions/github": "^6.0.0", | ||
"@swc-node/register": "^1.10.9", | ||
"@swc/cli": "^0.6.0", | ||
"@swc/core": "^1.10.8", | ||
"@swc/helpers": "^0.5.15", | ||
"cross-env": "^7.0.3" | ||
}, | ||
"engines": { | ||
"node": ">= 20.18.1", | ||
"pnpm": ">= 9.14.4" | ||
} | ||
} |
Oops, something went wrong.