mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-22 09:12:58 +01:00
Fix build number not the same
This commit is contained in:
parent
c8a0864fdd
commit
eef0bbf78a
54
.github/workflows/build_addon.yml
vendored
54
.github/workflows/build_addon.yml
vendored
@ -158,3 +158,57 @@ jobs:
|
|||||||
cache-to: type=inline
|
cache-to: type=inline
|
||||||
context: ./${{env.TARGET}}/
|
context: ./${{env.TARGET}}/
|
||||||
platforms: ${{ matrix.arch_value }}
|
platforms: ${{ matrix.arch_value }}
|
||||||
|
|
||||||
|
publish-main:
|
||||||
|
name: Publish main
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- build-dockers
|
||||||
|
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'release' }}
|
||||||
|
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_number}}
|
||||||
|
|
||||||
|
- 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_number}}
|
||||||
|
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_number }}"
|
||||||
|
branch: "update/bextcloud_backup/${{ steps.branch-names.outputs.current_branch }}.${{ github.run_number }}"
|
||||||
|
base: "${{ steps.branch-names.outputs.current_branch }}"
|
||||||
|
title: "Update Nextcloud Backup to ${{ steps.branch-names.outputs.current_branch }}.${{ github.run_number }}"
|
||||||
|
|
60
.github/workflows/update_repository.yml
vendored
60
.github/workflows/update_repository.yml
vendored
@ -1,60 +0,0 @@
|
|||||||
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_number}}
|
|
||||||
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_number }}"
|
|
||||||
branch: "update/bextcloud_backup/${{ steps.branch-names.outputs.current_branch }}.${{ github.run_number }}"
|
|
||||||
base: "${{ steps.branch-names.outputs.current_branch }}"
|
|
||||||
title: "Update Nextcloud Backup to ${{ steps.branch-names.outputs.current_branch }}.${{ github.run_number }}"
|
|
Loading…
Reference in New Issue
Block a user