diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml new file mode 100644 index 0000000..4ca2314 --- /dev/null +++ b/.github/workflows/update-version.yml @@ -0,0 +1,42 @@ +name: Update version +run-name: Update latest version names of the docker images +on: + schedule: + - cron: '30 */4 * * *' + workflow_dispatch: + +jobs: + logLatestRelease: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: octokit/request-action@v2.x + id: get_latest_release + with: + route: GET /users/Donkie/packages/container/Spoolman/versions?per_page=100 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + + - run: "echo '${{ steps.get_latest_release.outputs.data }}' > /tmp/data.json" + + - id: update_version + run: | + STABLE_VERSION=$(jq -r 'map(select(.metadata.container.tags | any(. == "latest"))) | .[0].metadata.container.tags | map(select(. != "latest")) | .[0]' /tmp/data.json 2>/dev/null || true) + + echo Latest Stable: $STABLE_VERSION + + if [ -n "$STABLE_VERSION" ] + then + sed -i 's|^version: .*|version: '"$STABLE_VERSION"'|' spoolman/config.yaml + fi + + echo "message=Update version numbers to: '$STABLE_VERSION'" >> "$GITHUB_OUTPUT" + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "${{ steps.update_version.outputs.message }}" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..556a251 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/.idea/ +/hassio-spoolman.iml diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3eb8b9f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Gunther Schmidl + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..cffb401 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# hassio-spoolman + +Home Assistant repository to run Spoolman as an addon + +# Installation + +Use the following link to add the repository: + +[![Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Fgschmidl%2Fhassio-spoolman) + +Alternatively go to the Add-On Store, Click the three dots, then Repositories, and then add the following: + +``` +https://github.com/gschmidl/hassio-spoolman +``` diff --git a/repository.json b/repository.json new file mode 100644 index 0000000..17d9a9e --- /dev/null +++ b/repository.json @@ -0,0 +1,5 @@ +{ + "name": "Home Assistant Add-on: Spoolman", + "url": "https://github.com/gschmidl/hassio-spoolman", + "maintainer": "Gunther Schmidl" + } diff --git a/spoolman/config.yaml b/spoolman/config.yaml new file mode 100644 index 0000000..08b998e --- /dev/null +++ b/spoolman/config.yaml @@ -0,0 +1,16 @@ +name: "Spoolman" +description: "Run the latest stable version of Spoolman." +url: "https://github.com/Donkie/Spoolman" +slug: "spoolman" +init: false +arch: + - amd64 + - arm64 + - armv7 +startup: application +webui: "[PROTO:option_name]://[HOST]:[PORT:7912]" +boot: auto +ports: + 7912/tcp: 7912 +image: ghcr.io/donkie/spoolman +version: 0.15 diff --git a/spoolman/icon.png b/spoolman/icon.png new file mode 100644 index 0000000..b7c139f Binary files /dev/null and b/spoolman/icon.png differ diff --git a/spoolman/logo.png b/spoolman/logo.png new file mode 100644 index 0000000..2489d61 Binary files /dev/null and b/spoolman/logo.png differ