test #7
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
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: | | ||
echo VERSION=$(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.VERSION == "" }} | ||
run: echo building new image because version mismatch |