-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
push: | ||
branches: | ||
- "*" | ||
tags: | ||
tags: | ||
- "*" | ||
pull_request: | ||
|
||
|
@@ -89,7 +89,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: [ aarch64, amd64, armv7 ] | ||
arch: [aarch64, amd64, armv7] | ||
include: | ||
- arch: aarch64 | ||
arch_value: linux/arm64/v8 | ||
|
@@ -120,19 +120,19 @@ jobs: | |
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}} | ||
${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=branch,suffix=.${{ github.run_number }} | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
labels: | | ||
io.hass.name=${{env.NAME}} | ||
io.hass.description=${{env.DESCRIPTION}} | ||
io.hass.url=${{env.URL}} | ||
io.hass.arch=${{matrix.arch}} | ||
io.hass.type=addon | ||
io.hass.name=${{env.NAME}} | ||
io.hass.description=${{env.DESCRIPTION}} | ||
io.hass.url=${{env.URL}} | ||
io.hass.arch=${{matrix.arch}} | ||
io.hass.type=addon | ||
- name: Debug Env | ||
run: | | ||
|
@@ -165,27 +165,27 @@ jobs: | |
update_main_ha_repository: | ||
name: Update HA addon repository | ||
runs-on: ubuntu-latest | ||
needs: | ||
needs: | ||
- build-dockers | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
with: | ||
path: "addon" | ||
- name: Checkout Hass repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: Sebclem/sebclem-hassio-addon-repository | ||
path: "repository" | ||
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/[email protected] | ||
with: | ||
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}} | ||
|
@@ -196,30 +196,28 @@ jobs: | |
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 | ||
uses: fjogeleit/yaml-update-action@V0.15.0 | ||
with: | ||
valueFile: 'repository/nextcloud_backup/config.yml' | ||
propertyPath: 'version' | ||
valueFile: "repository/nextcloud_backup/config.yml" | ||
propertyPath: "version" | ||
value: ${{ steps.branch-names.outputs.current_branch }}.${{ github.run_number}} | ||
commitChange: false | ||
|
||
- name: Add image propertie | ||
uses: fjogeleit/yaml-update-action@main | ||
- name: Add image propertie | ||
uses: fjogeleit/yaml-update-action@V0.15.0 | ||
with: | ||
valueFile: 'repository/nextcloud_backup/config.yml' | ||
propertyPath: 'image' | ||
valueFile: "repository/nextcloud_backup/config.yml" | ||
propertyPath: "image" | ||
value: "ghcr.io/sebclem/hassio-nextcloud-backup/{arch}" | ||
commitChange: false | ||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@v6 | ||
|
||
- name: Commit and push | ||
uses: actions-js/[email protected] | ||
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 }}" | ||
|
||
github_token: ${{ secrets.PAT_PR }} | ||
directory: "repository" | ||
message: "Update Nextcloud Backup to ${{ steps.branch-names.outputs.current_branch }}.${{ github.run_number }}" | ||
branch: "${{ steps.branch-names.outputs.current_branch }}" | ||
repository: "Sebclem/sebclem-hassio-addon-repository" |