Skip to content

Sonarr

Sonarr #15

Workflow file for this run

name: Sonarr
on:
push:
branches:
- main
paths:
- sonarr/Dockerfile
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
check-version:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Get release version
run: echo VERSION=$(curl -s https://services.sonarr.tv/v1/releases | jq -r '."v4-stable".version') >> $GITHUB_ENV
- name: Print release version
run: echo $VERSION
- name: Compare to repo version
run: |
echo CHECK=$(curl -s -H "Authorization: Bearer $(echo -n ${{ secrets.GITHUB_TOKEN }} | base64)" https://ghcr.io/v2/${{ github.repository_owner }}/sonarr/tags/list | jq -r '.tags[]' | grep $VERSION || true) >> $GITHUB_ENV
- name: Build image
# if: ${{ env.CHECK == '' || github.event_name == 'workflow_dispatch' }}
if: ${{ env.CHECK == '' }}
uses: ./.github/workflows/main.yml
with:
app: sonarr
tags: |
type=ref,event=branch
type=sha
type=raw,value=v4-stable
type=raw,value=${{ env.VERSION }}