-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from LocalBytes/feature/lb-184-publication
Feature/lb 184 publication
- Loading branch information
Showing
7 changed files
with
1,128 additions
and
1,621 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 |
---|---|---|
@@ -0,0 +1,116 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: "Build and Publish" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- uses: pnpm/action-setup@v3 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: "${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}" | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install -r | ||
|
||
- name: Get version | ||
id: version | ||
run: echo version=$(node -p -e "require('./packages/localdeck-configurator/package.json').version") >> $GITHUB_ENV | ||
|
||
- name: Build | ||
run: | | ||
sed -i "s/VERSION/${{ env.version }}/g" ./packages/localdeck-configurator/homeassistant/config.yaml | ||
pnpm --filter=localdeck-configurator build | ||
mkdir -p .temp | ||
cp -r ./packages/localdeck-configurator/{.output,homeassistant}/* ./.temp | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: localdeck-configurator | ||
path: .temp | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: localdeck-configurator-hass | ||
path: ./packages/localdeck-configurator/homeassistant | ||
|
||
publish: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
steps: | ||
- name: GHCR User | ||
run: echo "ghcr_user=${GITHUB_REPOSITORY_OWNER@L}" >> "${GITHUB_ENV}" | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ env.ghcr_user }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: localdeck-configurator | ||
path: localdeck-configurator | ||
|
||
- name: Publish | ||
uses: home-assistant/builder@master | ||
with: | ||
args: | | ||
--all \ | ||
--target localdeck-configurator \ | ||
--docker-hub "ghcr.io/${{ env.ghcr_user }}" | ||
publish-subtree: | ||
needs: [ build, publish ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: localdeck-configurator-hass | ||
path: localdeck-configurator | ||
|
||
- name: Pushes to another repository | ||
uses: cpina/github-action-push-to-another-repository@main | ||
env: | ||
SSH_DEPLOY_KEY: ${{ secrets.SSH_LOCALBYTES_HELLO }} | ||
with: | ||
source-directory: 'localdeck-configurator' | ||
target-directory: 'localdeck-configurator' | ||
|
||
destination-github-username: '${{ github.repository_owner }}' | ||
destination-repository-name: 'hass-addons' | ||
|
||
user-name: "LocalBytes Bot" | ||
user-email: "[email protected]" | ||
target-branch: main |
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
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
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,43 +1,26 @@ | ||
## LocalDeck configurator for Home Assistant | ||
# LocalDeck configurator for Home Assistant | ||
|
||
To install, extract the contents of this folder to your Home Assistant `addons` folder. | ||
In your Home Assistant dashboard, go to Supervisor -> Add-on Store, | ||
and click the refresh button in the top right corner. | ||
The configurator should now appear in the list of available add-ons. | ||
Welcome to the LocalDeck configurator for Home Assistant. | ||
This add-on allows you to configure your LocalDeck devices from within Home Assistant. | ||
|
||
## Making your existing config compatible | ||
The LocalDeck is a 24-key programmable keypad that can be used to control your Home Assistant instance. | ||
You can find our more [LocalBytes / LocalDeck Bundle](https://mylocalbytes.com/products/localdeck-bundle) | ||
|
||
There are a few minor changes you need to make to your existing config to make it compatible with the configurator. | ||
The online configurator has not been updated to reflect these. | ||
## Installation | ||
|
||
Without these changes, your config will be read correctly, | ||
but saving will override your config with the default config header. | ||
1. Add the repository to your Home Assistant instance. | ||
2. Install & Start the "LocalDeck configurator" add-on. | ||
3. Open the "LocalDeck configurator" web UI. | ||
4. Configure your LocalDeck! | ||
|
||
From: | ||
## Support | ||
|
||
```yaml | ||
# This file was generated by the LocalBytes LocalDeck Configurator | ||
# https://feature-lb-32-firmware-confi.localbytes-blog.pages.dev/tools/localdeck-configurator?config=[...] | ||
For any questions regarding the LocalDeck or what it can do, please head over to | ||
the [LocalBytes Forum / LocalDeck](https://forum.mylocalbytes.com/t/localdeck) | ||
As a customer, you do have access to our email support, however, | ||
we always suggest going via the Forum first, as others may have similar questions | ||
|
||
wifi: | ||
ap: | ||
ssid: LocalBytes LocalDeck | ||
``` | ||
## Contributing | ||
|
||
To: | ||
```yaml | ||
# This file was generated by the LocalBytes LocalDeck Configurator | ||
wifi: | ||
ap: | ||
ssid: LocalBytes LocalDeck | ||
|
||
[ ... ] | ||
|
||
# Anything below this line will be removed when saving. | ||
# To change this, navigate to the LocalBytes LocalDeck Configurator. | ||
# Your changes will be lost! | ||
# Edit: https://feature-lb-32-firmware-confi.localbytes-blog.pages.dev/tools/localdeck-configurator?config=[...] | ||
|
||
light: | ||
``` | ||
If you have any suggestions or improvements, please feel free to open a pull | ||
request - [GitHub / LocalBytes / LocalDeck Config](https://github.com/LocalBytes/localdeck-config)! |
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
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
Oops, something went wrong.