Skip to content

test

test #6

Workflow file for this run

name: test
on: [workflow_dispatch]
jobs:
check-version:
runs-on: ubuntu-latest
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: Get repo version
id: repo
run: |
REPO=$(curl --silent \
--header "Authorization: Bearer $(echo -n ${{ secrets.GITHUB_TOKEN }} | base64)" \
--url https://ghcr.io/v2/${{ github.repository_owner }}/sonarr/tags/list |
jq -r '.tags[]' | grep $VERSION) >> $GITHUB_ENV
continue-on-error: true
- name: Build image
if: ${{ env.VERSION != env.REPO }}
run: echo building new image because version mismatch