Compare commits
44 Commits
@@ -1,19 +0,0 @@
|
|||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
charset = utf-8
|
|
||||||
end_of_line = lf
|
|
||||||
indent_style = space
|
|
||||||
insert_final_newline = true
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
ident_size = 4
|
|
||||||
|
|
||||||
[*.md]
|
|
||||||
ident_size = 2
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.json]
|
|
||||||
ident_size = 2
|
|
||||||
|
|
||||||
[{.gitignore,.gitkeep,.editorconfig}]
|
|
||||||
ident_size = 2
|
|
||||||
1839
.github/SECURITY.md
vendored
Normal file
1839
.github/SECURITY.md
vendored
Normal file
File diff suppressed because it is too large
Load Diff
35
.github/workflows/ci.yaml
vendored
35
.github/workflows/ci.yaml
vendored
@@ -27,7 +27,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
- name: 🚀 Run add-on information action
|
- name: 🚀 Run add-on information action
|
||||||
id: information
|
id: information
|
||||||
uses: frenck/action-addon-information@v1.0.0
|
uses: frenck/action-addon-information@v1.2.2
|
||||||
|
|
||||||
lint-addon:
|
lint-addon:
|
||||||
name: Lint Add-on
|
name: Lint Add-on
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
- name: ⤵️ Check out code from GitHub
|
- name: ⤵️ Check out code from GitHub
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
- name: 🚀 Run Add-on Lint
|
- name: 🚀 Run Add-on Lint
|
||||||
uses: frenck/action-addon-linter@v1.4
|
uses: frenck/action-addon-linter@v2.1
|
||||||
with:
|
with:
|
||||||
community: true
|
community: true
|
||||||
path: "./${{ needs.information.outputs.target }}"
|
path: "./${{ needs.information.outputs.target }}"
|
||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
- name: ⤵️ Check out code from GitHub
|
- name: ⤵️ Check out code from GitHub
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
- name: 🚀 Run Hadolint
|
- name: 🚀 Run Hadolint
|
||||||
uses: brpaz/hadolint-action@v1.3.1
|
uses: brpaz/hadolint-action@v1.5.0
|
||||||
with:
|
with:
|
||||||
dockerfile: "./${{ needs.information.outputs.target }}/Dockerfile"
|
dockerfile: "./${{ needs.information.outputs.target }}/Dockerfile"
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ jobs:
|
|||||||
- name: ⤵️ Check out code from GitHub
|
- name: ⤵️ Check out code from GitHub
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
- name: 🚀 Run Shellcheck
|
- name: 🚀 Run Shellcheck
|
||||||
uses: ludeeus/action-shellcheck@1.0.0
|
uses: ludeeus/action-shellcheck@1.1.0
|
||||||
env:
|
env:
|
||||||
SHELLCHECK_OPTS: -s bash
|
SHELLCHECK_OPTS: -s bash
|
||||||
|
|
||||||
@@ -129,16 +129,20 @@ jobs:
|
|||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
- name: 🏗 Set up build cache
|
- name: 🏗 Set up build cache
|
||||||
id: cache
|
id: cache
|
||||||
uses: actions/cache@v2.1.4
|
uses: actions/cache@v2.1.6
|
||||||
with:
|
with:
|
||||||
path: /tmp/.docker-cache
|
path: /tmp/.docker-cache
|
||||||
key: docker-${{ github.ref }}-${{ matrix.architecture }}-${{ github.sha }}
|
key:
|
||||||
|
docker-${{ github.ref }}-${{ matrix.architecture }}-${{ github.sha
|
||||||
|
}}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
docker-${{ github.ref }}-${{ matrix.architecture }}
|
docker-${{ github.ref }}-${{ matrix.architecture }}
|
||||||
- name: 🏗 Set up QEMU
|
- name: 🏗 Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1.0.1
|
uses: docker/setup-qemu-action@v1.2.0
|
||||||
- name: 🏗 Set up Docker Buildx
|
- name: 🏗 Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1.1.1
|
uses: docker/setup-buildx-action@v1.5.0
|
||||||
|
- name: 🏗 Set up CodeNotary
|
||||||
|
run: bash <(curl https://getvcn.codenotary.com -L)
|
||||||
- name: ℹ️ Compose build flags
|
- name: ℹ️ Compose build flags
|
||||||
id: flags
|
id: flags
|
||||||
run: |
|
run: |
|
||||||
@@ -160,8 +164,21 @@ jobs:
|
|||||||
echo "::error ::Could not determine platform for architecture ${{ matrix.architecture }}"
|
echo "::error ::Could not determine platform for architecture ${{ matrix.architecture }}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
- name: ⤵️ Download base image
|
||||||
|
run: docker pull "${{ steps.flags.outputs.from }}"
|
||||||
|
- name: ✅ Verify authenticity of base image
|
||||||
|
run: |
|
||||||
|
vcn authenticate \
|
||||||
|
"docker://${{ steps.flags.outputs.from }}"
|
||||||
|
vcn authenticate \
|
||||||
|
--output json \
|
||||||
|
--signerID 0x03e406879fd89e52f38f4aab0061266d1183980a \
|
||||||
|
"docker://${{ steps.flags.outputs.from }}" \
|
||||||
|
| jq \
|
||||||
|
--exit-status \
|
||||||
|
'.verification.status == 0'
|
||||||
- name: 🚀 Build
|
- name: 🚀 Build
|
||||||
uses: docker/build-push-action@v2.2.2
|
uses: docker/build-push-action@v2.6.1
|
||||||
with:
|
with:
|
||||||
push: false
|
push: false
|
||||||
context: ${{ needs.information.outputs.target }}
|
context: ${{ needs.information.outputs.target }}
|
||||||
|
|||||||
70
.github/workflows/deploy.yaml
vendored
70
.github/workflows/deploy.yaml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
- name: 🚀 Run add-on information action
|
- name: 🚀 Run add-on information action
|
||||||
id: information
|
id: information
|
||||||
uses: frenck/action-addon-information@v1.0.0
|
uses: frenck/action-addon-information@v1.2.2
|
||||||
- name: ℹ️ Gather version and environment
|
- name: ℹ️ Gather version and environment
|
||||||
id: release
|
id: release
|
||||||
run: |
|
run: |
|
||||||
@@ -64,20 +64,28 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
architecture: ${{ fromJson(needs.information.outputs.architectures) }}
|
architecture: ${{ fromJson(needs.information.outputs.architectures) }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: 🔂 Wait for other runs to complete
|
||||||
|
uses: softprops/turnstyle@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: ⤵️ Check out code from GitHub
|
- name: ⤵️ Check out code from GitHub
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
- name: 🏗 Set up build cache
|
- name: 🏗 Set up build cache
|
||||||
id: cache
|
id: cache
|
||||||
uses: actions/cache@v2.1.4
|
uses: actions/cache@v2.1.6
|
||||||
with:
|
with:
|
||||||
path: /tmp/.docker-cache
|
path: /tmp/.docker-cache
|
||||||
key: docker-${{ github.ref }}-${{ matrix.architecture }}-${{ github.sha }}
|
key:
|
||||||
|
docker-${{ github.ref }}-${{ matrix.architecture }}-${{ github.sha
|
||||||
|
}}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
docker-${{ github.ref }}-${{ matrix.architecture }}
|
docker-${{ github.ref }}-${{ matrix.architecture }}
|
||||||
- name: 🏗 Set up QEMU
|
- name: 🏗 Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1.0.1
|
uses: docker/setup-qemu-action@v1.2.0
|
||||||
- name: 🏗 Set up Docker Buildx
|
- name: 🏗 Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1.1.1
|
uses: docker/setup-buildx-action@v1.5.0
|
||||||
|
- name: 🏗 Set up CodeNotary
|
||||||
|
run: bash <(curl https://getvcn.codenotary.com -L)
|
||||||
- name: ℹ️ Compose build flags
|
- name: ℹ️ Compose build flags
|
||||||
id: flags
|
id: flags
|
||||||
run: |
|
run: |
|
||||||
@@ -100,15 +108,28 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: 🏗 Login to GitHub Container Registry
|
- name: 🏗 Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v1.8.0
|
uses: docker/login-action@v1.10.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ secrets.GHCR_USERNAME }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GHCR_PASSWORD }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: 🚀 Build and push
|
- name: ⤵️ Download base image
|
||||||
uses: docker/build-push-action@v2.2.2
|
run: docker pull "${{ steps.flags.outputs.from }}"
|
||||||
|
- name: ✅ Verify authenticity of base image
|
||||||
|
run: |
|
||||||
|
vcn authenticate \
|
||||||
|
"docker://${{ steps.flags.outputs.from }}"
|
||||||
|
vcn authenticate \
|
||||||
|
--output json \
|
||||||
|
--signerID 0x03e406879fd89e52f38f4aab0061266d1183980a \
|
||||||
|
"docker://${{ steps.flags.outputs.from }}" \
|
||||||
|
| jq \
|
||||||
|
--exit-status \
|
||||||
|
'.verification.status == 0'
|
||||||
|
- name: 🚀 Build
|
||||||
|
uses: docker/build-push-action@v2.6.1
|
||||||
with:
|
with:
|
||||||
push: true
|
load: true
|
||||||
# yamllint disable rule:line-length
|
# yamllint disable rule:line-length
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/hassio-addons/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}
|
ghcr.io/hassio-addons/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}
|
||||||
@@ -130,6 +151,33 @@ jobs:
|
|||||||
BUILD_REF=${{ github.sha }}
|
BUILD_REF=${{ github.sha }}
|
||||||
BUILD_REPOSITORY=${{ github.repository }}
|
BUILD_REPOSITORY=${{ github.repository }}
|
||||||
BUILD_VERSION=${{ needs.information.outputs.version }}
|
BUILD_VERSION=${{ needs.information.outputs.version }}
|
||||||
|
- name: 🔏 Notarize
|
||||||
|
# yamllint disable rule:line-length
|
||||||
|
run: |
|
||||||
|
if vcn authenticate \
|
||||||
|
--output json \
|
||||||
|
"docker://ghcr.io/hassio-addons/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.version }}" \
|
||||||
|
| jq \
|
||||||
|
--exit-status \
|
||||||
|
'.verification.status != 0';
|
||||||
|
then
|
||||||
|
vcn login
|
||||||
|
vcn notarize \
|
||||||
|
--public \
|
||||||
|
"docker://ghcr.io/hassio-addons/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.version }}"
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
VCN_USER: ${{ secrets.VCN_USER }}
|
||||||
|
VCN_PASSWORD: ${{ secrets.VCN_PASSWORD }}
|
||||||
|
VCN_NOTARIZATION_PASSWORD: ${{ secrets.VCN_NOTARIZATION_PASSWORD }}
|
||||||
|
VCN_OTP_EMPTY: true
|
||||||
|
- name: 🚀 Push
|
||||||
|
# yamllint disable rule:line-length
|
||||||
|
run: |
|
||||||
|
docker push \
|
||||||
|
"ghcr.io/hassio-addons/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}"
|
||||||
|
docker push \
|
||||||
|
"ghcr.io/hassio-addons/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.version }}"
|
||||||
|
|
||||||
publish-edge:
|
publish-edge:
|
||||||
name: 📢 Publish to edge repository
|
name: 📢 Publish to edge repository
|
||||||
|
|||||||
2
.github/workflows/labels.yaml
vendored
2
.github/workflows/labels.yaml
vendored
@@ -17,6 +17,6 @@ jobs:
|
|||||||
- name: ⤵️ Check out code from GitHub
|
- name: ⤵️ Check out code from GitHub
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
- name: 🚀 Run Label Syncer
|
- name: 🚀 Run Label Syncer
|
||||||
uses: micnncim/action-label-syncer@v1.2.0
|
uses: micnncim/action-label-syncer@v1.3.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
21
.github/workflows/pr-labels.yaml
vendored
Normal file
21
.github/workflows/pr-labels.yaml
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
name: PR Labels
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, labeled, unlabeled, synchronize]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pr_labels:
|
||||||
|
name: Verify
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 🏷 Verify PR has a valid label
|
||||||
|
uses: jesusvasquez333/verify-pr-label-action@v1.4.0
|
||||||
|
with:
|
||||||
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
valid-labels: >-
|
||||||
|
breaking-change, bugfix, documentation, enhancement, refactor,
|
||||||
|
performance, new-feature, maintenance, ci, dependencies
|
||||||
|
disable-reviews: true
|
||||||
2
.github/workflows/release-drafter.yaml
vendored
2
.github/workflows/release-drafter.yaml
vendored
@@ -13,6 +13,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 🚀 Run Release Drafter
|
- name: 🚀 Run Release Drafter
|
||||||
uses: release-drafter/release-drafter@v5.13.0
|
uses: release-drafter/release-drafter@v5.15.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
2
.github/workflows/stale.yaml
vendored
2
.github/workflows/stale.yaml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 🚀 Run stale
|
- name: 🚀 Run stale
|
||||||
uses: actions/stale@v3.0.15
|
uses: actions/stale@v3.0.19
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
days-before-stale: 30
|
days-before-stale: 30
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:9.1.2
|
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:10.0.0
|
||||||
# hadolint ignore=DL3006
|
# hadolint ignore=DL3006
|
||||||
FROM ${BUILD_FROM}
|
FROM ${BUILD_FROM}
|
||||||
|
|
||||||
@@ -10,14 +10,14 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|||||||
RUN \
|
RUN \
|
||||||
apk add --no-cache --virtual .build-dependencies \
|
apk add --no-cache --virtual .build-dependencies \
|
||||||
build-base=0.5-r2 \
|
build-base=0.5-r2 \
|
||||||
linux-headers=5.7.8-r0 \
|
linux-headers=5.10.41-r0 \
|
||||||
git=2.30.0-r0 \
|
git=2.32.0-r0 \
|
||||||
\
|
\
|
||||||
&& apk add --no-cache \
|
&& apk add --no-cache \
|
||||||
libgcc=10.2.1_pre1-r3 \
|
libgcc=10.3.1_git20210424-r2 \
|
||||||
libstdc++=10.2.1_pre1-r3 \
|
libstdc++=10.3.1_git20210424-r2 \
|
||||||
\
|
\
|
||||||
&& git clone --branch "1.6.3" --depth=1 \
|
&& git clone --branch "1.6.5" --depth=1 \
|
||||||
"https://github.com/zerotier/ZeroTierOne.git" /tmp/zerotier \
|
"https://github.com/zerotier/ZeroTierOne.git" /tmp/zerotier \
|
||||||
\
|
\
|
||||||
&& cd /tmp/zerotier \
|
&& cd /tmp/zerotier \
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"build_from": {
|
"build_from": {
|
||||||
"aarch64": "ghcr.io/hassio-addons/base/aarch64:9.1.2",
|
"aarch64": "ghcr.io/hassio-addons/base/aarch64:10.0.0",
|
||||||
"amd64": "ghcr.io/hassio-addons/base/amd64:9.1.2",
|
"amd64": "ghcr.io/hassio-addons/base/amd64:10.0.0",
|
||||||
"armhf": "ghcr.io/hassio-addons/base/armhf:9.1.2",
|
"armhf": "ghcr.io/hassio-addons/base/armhf:10.0.0",
|
||||||
"armv7": "ghcr.io/hassio-addons/base/armv7:9.1.2",
|
"armv7": "ghcr.io/hassio-addons/base/armv7:10.0.0",
|
||||||
"i386": "ghcr.io/hassio-addons/base/i386:9.1.2"
|
"i386": "ghcr.io/hassio-addons/base/i386:10.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
},
|
},
|
||||||
"host_network": true,
|
"host_network": true,
|
||||||
"privileged": ["NET_ADMIN", "SYS_ADMIN"],
|
"privileged": ["NET_ADMIN", "SYS_ADMIN"],
|
||||||
"devices": ["/dev/net/tun:/dev/net/tun:rwm"],
|
"devices": ["/dev/net/tun"],
|
||||||
"map": ["ssl:rw"],
|
"map": ["ssl:rw"],
|
||||||
"options": {
|
"options": {
|
||||||
"networks": [],
|
"networks": [],
|
||||||
|
|||||||
Reference in New Issue
Block a user