Try auto update via github action

This commit is contained in:
SebClem 2024-08-26 15:48:56 +02:00
parent 5980354520
commit af398edbc5
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
5 changed files with 95 additions and 43 deletions

View File

@ -97,7 +97,6 @@ jobs:
arch_value: linux/arm/v7 arch_value: linux/arm/v7
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up QEMU - name: Set up QEMU

60
.github/workflows/update_repository.yml vendored Normal file
View File

@ -0,0 +1,60 @@
name: Update repository
on:
release:
types: [published]
push:
branches: main
workflow_dispatch:
jobs:
publish-main:
name: Publish main
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
path: "addon"
- name: Checkout Hass repo
uses: actions/checkout@v4
with:
repository: Sebclem/sebclem-hassio-addon-repository
path: "repository"
- name: Get branch names
id: branch-names
uses: tj-actions/branch-names@v8
- name: Generate readme
uses: cuchi/jinja2-action@v1.2.2
with:
template: addon/nextcloud_backup/.README.md.j2
output_file: repository/nextcloud_backup/README.md
variables: version=${{ steps.branch-names.outputs.current_branch }}.${{ github.run_id}}
- name: Move other files
run: |
cp addon/nextcloud_backup/Docs.md repository/nextcloud_backup/
cp addon/nextcloud_backup/icon.png repository/nextcloud_backup/
cp addon/nextcloud_backup/logo.png repository/nextcloud_backup/
cp addon/nextcloud_backup/config.yml repository/nextcloud_backup/
- name: Change version in config file
uses: fjogeleit/yaml-update-action@main
with:
valueFile: 'repository/nextcloud_backup/config.yml'
propertyPath: 'version'
value: ${{ steps.branch-names.outputs.current_branch }}.${{ github.run_id}}
commitChange: false
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PAT_PR }}
path: "repository"
commit-message: "Update Nextcloud Backup to ${{ steps.branch-names.outputs.current_branch }}.${{ github.run_id}}"
branch: "update/Nextcloud Backup/${{ steps.branch-names.outputs.current_branch }}.${{ github.run_id}}"
base: "${{ steps.branch-names.outputs.current_branch }}"
title: "Update Nextcloud Backup to ${{ steps.branch-names.outputs.current_branch }}.${{ github.run_id}}"

View File

@ -27,9 +27,9 @@ Easily backup your Home Assistant snapshots to Nextcloud.
[docs]: https://github.com/Sebclem/hassio-nextcloud-backup/blob/master/README.md [docs]: https://github.com/Sebclem/hassio-nextcloud-backup/blob/master/README.md
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg [forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg
[forum]: https://community.home-assistant.io/ [forum]: https://community.home-assistant.io/
[maintenance-shield]: https://img.shields.io/maintenance/yes/2022.svg [maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg
[project-stage-shield]: https://img.shields.io/badge/project%20stage-beta-red.svg [project-stage-shield]: https://img.shields.io/badge/project%20stage-beta-red.svg
[release-shield]: https://img.shields.io/badge/version-<%= version %>-blue.svg [release-shield]: https://img.shields.io/badge/version-{{ version }}-blue.svg
[release]: https://img.shields.io/badge/version-<%= version %>-blue.svg [release]: https://img.shields.io/badge/version-{{ version }}-blue.svg
[image]: https://github.com/Sebclem/hassio-nextcloud-backup/raw/master/images/screenshot.png [image]: https://github.com/Sebclem/hassio-nextcloud-backup/raw/master/images/screenshot.png
[logo]: https://github.com/Sebclem/hassio-nextcloud-backup/raw/master/nextcloud_backup/logo.png [logo]: https://github.com/Sebclem/hassio-nextcloud-backup/raw/master/nextcloud_backup/logo.png

View File

@ -1,39 +0,0 @@
{
"name": "Nextcloud Backup",
"version": "dev",
"slug": "nextcloud_backup",
"description": "Easily upload your Home Assistant backups to Nextcloud",
"url": "https://github.com/Sebclem/hassio-nextcloud-backup",
"webui": "[PROTO:ssl]://[HOST]:[PORT:3000]/",
"ingress": true,
"ingress_port": 3000,
"panel_icon": "mdi:cloud-upload",
"panel_title": "NC Backup",
"panel_admin": true,
"startup": "application",
"stage": "experimental",
"init": false,
"arch": [
"aarch64",
"amd64",
"armv7"
],
"boot": "auto",
"hassio_api": true,
"hassio_role": "admin",
"homeassistant_api": true,
"options": {
"log_level": "info",
"create_backup_timeout": 5400000
},
"schema": {
"log_level": "list(trace|debug|info|notice|warning|error|fatal)",
"create_backup_timeout": "int"
},
"ports": {
"3000/tcp": null
},
"ports_description": {
"3000/tcp": "Web interface (Not required for Home Assistant Ingress)"
}
}

View File

@ -0,0 +1,32 @@
name: Nextcloud Backup
version: dev
slug: nextcloud_backup
description: Easily upload your Home Assistant backups to Nextcloud
url: https://github.com/Sebclem/hassio-nextcloud-backup
webui: "[PROTO:ssl]://[HOST]:[PORT:3000]/"
ingress: true
ingress_port: 3000
panel_icon: mdi:cloud-upload
panel_title: NC Backup
panel_admin: true
startup: application
stage: experimental
init: false
arch:
- aarch64
- amd64
- armv7
boot: auto
hassio_api: true
hassio_role: admin
homeassistant_api: true
options:
log_level: info
create_backup_timeout: 5400000
schema:
log_level: list(trace|debug|info|notice|warning|error|fatal)
create_backup_timeout: int
ports:
3000/tcp: null
ports_description:
3000/tcp: Web interface (Not required for Home Assistant Ingress)