From 7ff6256ae38fdb934dd90cf7de98551da0ac2186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sat, 14 Oct 2023 05:15:11 +0200 Subject: [PATCH] Check AlDanial/cloc releases (#63) --- .github/workflows/outdated.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/outdated.yml b/.github/workflows/outdated.yml index 966e18e..9df006f 100644 --- a/.github/workflows/outdated.yml +++ b/.github/workflows/outdated.yml @@ -70,3 +70,25 @@ jobs: - name: "Check for outdated production packages" run: "npm outdated --omit=dev" + + AlDanial_cloc: + name: "AlDanial/cloc" + runs-on: "ubuntu-22.04" + timeout-minutes: 5 + steps: + - + name: "Checkout repository" + uses: "actions/checkout@v3.6.0" + - + name: "Show available updates" + env: + GH_TOKEN: "${{ github.token }}" + run: | + CURRENT_VERSION="$( + cat .github/workflows/reusable-integrity.yml \ + | yq -r '."jobs".*."steps"[] | select(."run" | contains("gh api /repos")) | ."run"' \ + | sed -n -e 's/^\s*# \(v\S\+\)$/\1/p' + )" + LATEST_VERSION="$(gh api /repos/AlDanial/cloc/releases/latest --jq '."tag_name"')" + echo "LATEST=${LATEST_VERSION}" + test "${CURRENT_VERSION}" = "${LATEST_VERSION}"