From da986e7d3d2e66dfa9481579bd942c38884b3835 Mon Sep 17 00:00:00 2001 From: Tobias Brenner <19689801+brenner-tobias@users.noreply.github.com> Date: Fri, 4 Feb 2022 21:24:03 +0100 Subject: [PATCH] Ready for automatic update --- .README.j2 | 112 ++++++++++++++++++++++ .addons.yml | 7 ++ .github/workflows/repository-updater.yaml | 20 +--- .mdlrc | 1 + 4 files changed, 124 insertions(+), 16 deletions(-) create mode 100644 .README.j2 create mode 100644 .addons.yml create mode 100644 .mdlrc diff --git a/.README.j2 b/.README.j2 new file mode 100644 index 0000000..91fa952 --- /dev/null +++ b/.README.j2 @@ -0,0 +1,112 @@ +# Home Assistant Add-on Repository for Cloudflared + +![Project Stage][project-stage-shield] +![Maintenance][maintenance-shield] +[![License][license-shield]](LICENSE.md) + +## About + +Home Assistant allows anyone to create add-on repositories to share their +add-ons for Home Assistant easily. This repository is one of those repositories, +providing extra Home Assistant add-ons for your installation. + +The primary goal of this repository is to provide an add-on to use Cloudflared. +Additional add-ons might follow in the future. + +## Installation + +Adding this add-ons repository to your Home Assistant instance is +pretty straightforward. In the Home Assistant add-on store, +a possibility to add a repository is provided. + +Use the following URL to add this repository: + +```txt +{{ repo }} +``` + +## Add-ons provided by this repository + +{% for addon in addons %} +### ✓ [{{ addon.name }}][addon-{{ addon.target }}] + +![Latest Version][{{ addon.target }}-version-shield] +![Supports armhf Architecture][{{ addon.target }}-armhf-shield] +![Supports armv7 Architecture][{{ addon.target }}-armv7-shield] +![Supports aarch64 Architecture][{{ addon.target }}-aarch64-shield] +![Supports amd64 Architecture][{{ addon.target }}-amd64-shield] +![Supports i386 Architecture][{{ addon.target }}-i386-shield] + +{{ addon.description }} + +[:books: {{ addon.name }} add-on documentation][addon-doc-{{ addon.target }}] + +{% endfor %} +## Releases + +Releases are based on [Semantic Versioning][semver], and use the format +of ``MAJOR.MINOR.PATCH``. In a nutshell, the version will be incremented +based on the following: + +- ``MAJOR``: Incompatible or major changes. +- ``MINOR``: Backwards-compatible new features and enhancements. +- ``PATCH``: Backwards-compatible bugfixes and package updates. + +## Support + +Got questions? + +Open an issue here on GitHub. Note, we use a separate +GitHub repository for each add-on. Please ensure you are creating the issue +on the correct GitHub repository matching the add-on. + +{% for addon in addons %} +- [Open an issue for the add-on: {{ addon.name }}][{{ addon.target }}-issue] +{% endfor %} + +For a general repository issue or add-on ideas [open an issue here][issue] + +## License + +MIT License + +Copyright (c) 2022 Tobias Brenner + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +{% for addon in addons %} +[addon-{{ addon.target }}]: {{ addon.repo }}/tree/{{ addon.version }} +[addon-doc-{{ addon.target}}]: {{ addon.repo }}/blob/{{ addon.version }}/README.md +[{{ addon.target }}-issue]: {{ addon.repo }}/issues +[{{ addon.target }}-version-shield]: https://img.shields.io/badge/version-{{ addon.version }}-blue.svg +{% for arch in ['aarch64', 'amd64', 'armhf', 'armv7', 'i386'] %} +{% if arch in addon.archs %} +[{{ addon.target }}-{{ arch }}-shield]: https://img.shields.io/badge/{{ arch }}-yes-green.svg +{% else %} +[{{ addon.target }}-{{ arch }}-shield]: https://img.shields.io/badge/{{ arch }}-no-red.svg +{% endif %} +{% endfor %} +{% endfor %} +[gitlabci-shield]: https://gitlab.com/{{ name }}/badges/master/pipeline.svg +[gitlabci]: https://gitlab.com/{{ name }}/pipelines +[issue]: https://github.com/{{ name }}/issues +[license-shield]: https://img.shields.io/github/license/{{ name }}.svg +[maintenance-shield]: https://img.shields.io/maintenance/yes/2022.svg +[project-stage-shield]: https://img.shields.io/badge/project%20stage-production%20ready-brightgreen.svg +[semver]: http://semver.org/spec/v2.0.0.html diff --git a/.addons.yml b/.addons.yml new file mode 100644 index 0000000..a954144 --- /dev/null +++ b/.addons.yml @@ -0,0 +1,7 @@ +--- +channel: stable +addons: + cloudflared: + repository: brenner-tobias/addon-cloudflared + target: cloudflared + image: ghcr.io/brenner-tobias/cloudflared/{arch} diff --git a/.github/workflows/repository-updater.yaml b/.github/workflows/repository-updater.yaml index e8affd3..ff8e664 100644 --- a/.github/workflows/repository-updater.yaml +++ b/.github/workflows/repository-updater.yaml @@ -7,19 +7,7 @@ on: types: ["update"] jobs: - publish: - name: Publish add-on update - runs-on: ubuntu-latest - steps: - - name: 🔂 Wait for other runs to complete - uses: softprops/turnstyle@v1 - with: - continue-after-seconds: 1200 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: 🚀 Run Repository Updater - uses: hassio-addons/repository-updater@v1.2.2 - with: - addon: ${{ github.event.client_payload.addon }} - repository: ${{ github.repository }} - token: ${{ secrets.UPDATER_TOKEN }} + workflows: + uses: hassio-addons/workflows/.github/workflows/repository-updater.yaml@main + secrets: + UPDATER_TOKEN: ${{ secrets.UPDATER_TOKEN }} diff --git a/.mdlrc b/.mdlrc new file mode 100644 index 0000000..3ae4696 --- /dev/null +++ b/.mdlrc @@ -0,0 +1 @@ +rules "~MD024"