mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-22 09:12:58 +01:00
Fix label for addon build
This commit is contained in:
parent
9374659b42
commit
c05697568c
36
.github/workflows/build_addon.yml
vendored
36
.github/workflows/build_addon.yml
vendored
@ -109,16 +109,19 @@ jobs:
|
|||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx ${{matrix.arch}}
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Get build option ${{matrix.arch}}
|
- name: Read addon config
|
||||||
|
uses: pietrobolcato/action-read-yaml@1.0.0
|
||||||
|
id: addon_conf
|
||||||
|
with:
|
||||||
|
config: ${{ env.TARGET }}/config.yml
|
||||||
|
|
||||||
|
- name: Get build_from
|
||||||
|
id: build_from
|
||||||
run: |
|
run: |
|
||||||
echo "NAME=$(jq --raw-output '.name // empty' "${{env.TARGET}}/config.json" | sed "s/'//g")" >> $GITHUB_ENV
|
echo "build_from=ghcr.io/home-assistant/${{ matrix.arch }}-base:$(cat nextcloud_backup/.base_version)" >> $GITHUB_OUTPUT
|
||||||
echo "DESCRIPTION=$(jq --raw-output '.description // empty' "${{env.TARGET}}/config.json" | sed "s/'//g")" >> $GITHUB_ENV
|
|
||||||
echo "URL=$(jq --raw-output '.url // empty' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
|
||||||
echo "VERSION=$(jq --raw-output '.version' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
|
||||||
echo "BUILD_FROM=ghcr.io/home-assistant/${{matrix.arch}}-base:$(cat nextcloud_backup/.base_version)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
@ -133,16 +136,19 @@ jobs:
|
|||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
labels: |
|
labels: |
|
||||||
io.hass.name=${{env.NAME}}
|
io.hass.name=${{ steps.addon_conf.outputs['name'] }}
|
||||||
io.hass.description=${{env.DESCRIPTION}}
|
io.hass.description=${{ steps.addon_conf.outputs['description'] }}
|
||||||
io.hass.url=${{env.URL}}
|
io.hass.url=${{ steps.addon_conf.outputs['url'] }}
|
||||||
io.hass.arch=${{ matrix.arch }}
|
io.hass.arch=${{ matrix.arch }}
|
||||||
io.hass.type=addon
|
io.hass.type=addon
|
||||||
|
|
||||||
- name: Debug Env
|
- name: Change version in config file
|
||||||
run: |
|
uses: fjogeleit/yaml-update-action@v0.15.0
|
||||||
echo "${{ steps.meta.outputs.tags }}"
|
with:
|
||||||
echo "${{ steps.meta.outputs.labels }}"
|
valueFile: "nextcloud_backup/config.yml"
|
||||||
|
propertyPath: "version"
|
||||||
|
value: ${{ steps.meta.outputs.version }}.${{ github.run_number}}
|
||||||
|
commitChange: false
|
||||||
|
|
||||||
- name: Login to ghcr.io
|
- name: Login to ghcr.io
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -161,7 +167,7 @@ jobs:
|
|||||||
${{ steps.meta.outputs.labels }}
|
${{ steps.meta.outputs.labels }}
|
||||||
io.hass.version=${{steps.meta.outputs.version}}
|
io.hass.version=${{steps.meta.outputs.version}}
|
||||||
build-args: |
|
build-args: |
|
||||||
BUILD_FROM=${{env.BUILD_FROM}}
|
BUILD_FROM=${{ steps.build_from.outputs['build_from'] }}
|
||||||
file: ./${{ env.TARGET }}/Dockerfile
|
file: ./${{ env.TARGET }}/Dockerfile
|
||||||
cache-from: type=registry,ref=${{ env.REPOSITORY }}/${{ env.IMAGE }}/${{ matrix.arch }}:latest
|
cache-from: type=registry,ref=${{ env.REPOSITORY }}/${{ env.IMAGE }}/${{ matrix.arch }}:latest
|
||||||
cache-to: type=inline
|
cache-to: type=inline
|
||||||
|
Loading…
Reference in New Issue
Block a user