mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-22 17:22:58 +01:00
✏️ Switch form DockerHub to ghcr.io
This commit is contained in:
parent
eaf926f42e
commit
7e64da2d65
23
.github/workflows/build_addon.yml
vendored
23
.github/workflows/build_addon.yml
vendored
@ -2,24 +2,24 @@ name: Build addon
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
types: [ published ]
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
TARGET: nextcloud_backup
|
||||
IMAGE: "{arch}-hassio-nextcloud-backup"
|
||||
REPOSITORY: sebclemhassaddon
|
||||
IMAGE: "hassio-nextcloud-backup"
|
||||
REPOSITORY: ghcr.io/sebclem
|
||||
|
||||
|
||||
|
||||
jobs:
|
||||
build-armhf:
|
||||
build-dockers:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
arch: [aarch64, amd64, armv7, i386]
|
||||
arch: [ aarch64, amd64, armv7, i386 ]
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
@ -56,28 +56,27 @@ jobs:
|
||||
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 "IMAGE=$(echo "${{env.IMAGE}}" | sed -r "s/\{arch\}/${{matrix.arch}}/g")" >> $GITHUB_ENV
|
||||
echo "BUILD_FROM=hassioaddons/base-${{matrix.arch}}:$(cat nextcloud_backup/.base_version)" >> $GITHUB_ENV
|
||||
|
||||
- name: Set Tags ${{matrix.arch}}
|
||||
run: |
|
||||
if [ "${{env.version_type}}" != "dev" ]; then
|
||||
echo "TAGS=${{env.REPOSITORY}}/${{env.IMAGE}}:latest, ${{env.REPOSITORY}}/${{env.IMAGE}}:$(jq --raw-output '.version' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
||||
echo "TAGS=${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:latest, ${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:$(jq --raw-output '.version' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
||||
else
|
||||
echo "TAGS=${{env.REPOSITORY}}/${{env.IMAGE}}:dev, ${{env.REPOSITORY}}/${{env.IMAGE}}:$(jq --raw-output '.version' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
||||
echo "TAGS=${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:dev, ${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:$(jq --raw-output '.version' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Debug Env
|
||||
run: |
|
||||
echo ${{env.IMAGE}}
|
||||
echo ${{env.VERSION}}
|
||||
echo ${{env.TAGS}}
|
||||
|
||||
- name: Login to DockerHub
|
||||
- name: Login to ghcr.io
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
|
||||
- name: Build and push ${{matrix.arch}}
|
||||
uses: docker/build-push-action@v2
|
||||
|
Loading…
Reference in New Issue
Block a user