Update-deployment (#2281)

* Update deployment

* fix workflow

* Fix order

* restruct v1

* Fix style v2

* Cleanup style v3

* fix style v4

* Last style fix

* Address comments

* Update builder to 2021.11.3

* Fix let's encrypt

* fix lint

* Use ghcr.io

* fix

* Update versions

* fix readme
This commit is contained in:
Pascal Vizeli
2021-11-24 11:43:54 +01:00
committed by GitHub
parent fe641dfad2
commit 69c68bfac9
96 changed files with 1190 additions and 1189 deletions

View File

@@ -2,7 +2,7 @@ name: Build add-on
env:
BUILD_ARGS: "--test"
MONITORED_FILES: "apparmor.txt build.json config.json Dockerfile data rootfs"
MONITORED_FILES: "apparmor.txt build.yaml config.yaml Dockerfile data rootfs"
on:
pull_request:
@@ -30,7 +30,7 @@ jobs:
id: addons
run: |
declare -a addons
for addon in $(find ./ -name config.json | cut -d "/" -f2 | sort -u); do
for addon in $(find ./ -name config.yaml | cut -d "/" -f2 | sort -u); do
addons+=("$addon");
done
echo "::set-output name=addons::${addons[@]}"
@@ -66,7 +66,7 @@ jobs:
if: needs.init.outputs.changed == 'true'
name: Build ${{ matrix.arch }} ${{ matrix.addon }} add-on
strategy:
matrix:
matrix:
addon: ${{ fromJson(needs.init.outputs.changed_addons) }}
arch: ["aarch64", "amd64", "armhf", "armv7", "i386"]
@@ -83,14 +83,11 @@ jobs:
- name: Check add-on
id: check
run: |
if [[ "${{ steps.info.outputs.architectures }}" =~ ${{ matrix.arch }} ]]; then
echo "::set-output name=build_arch::true";
else
echo "${{ matrix.arch }} is not a valid arch for ${{ matrix.addon }}, skipping build";
fi
version=$(jq -r '.version' "./${{ matrix.addon }}/config.json")
echo "::set-output name=version::${version}";
if [[ "${{ steps.info.outputs.architectures }}" =~ ${{ matrix.arch }} ]]; then
echo "::set-output name=build_arch::true";
else
echo "${{ matrix.arch }} is not a valid arch for ${{ matrix.addon }}, skipping build";
fi
- name: Set build arguments
if: steps.check.outputs.build_arch == 'true'
@@ -116,12 +113,12 @@ jobs:
- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/builder@2021.09.0
uses: home-assistant/builder@2021.11.3
with:
args: |
${{ env.BUILD_ARGS }} \
--${{ matrix.arch }} \
--target /data/${{ matrix.addon }} \
--with-codenotary "${{ secrets.VCN_USER }}" "${{ secrets.VCN_PASSWORD }}" "${{ secrets.VCN_ORG }}" \
--validate-from "${{ secrets.VCN_ORG }}" \
--addon
env:
CAS_API_KEY: ${{ secrets.CAS_TOKEN }}