From 95c86f7ee5e97a9cd4995e54095958ad91d0e3f3 Mon Sep 17 00:00:00 2001 From: Markus Rudy Date: Thu, 15 Feb 2024 15:02:40 +0100 Subject: [PATCH] ci: only create milestone if absent Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 298d53dc3..34c34baec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -225,6 +225,12 @@ jobs: gh label create "backport ${RELEASE_BRANCH}" --color 576F61 --force - name: Create milestone run: | + gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + /repos/edgelesssys/nunki/milestones | + jq -r '.[] | .title' | \ + grep -xqF "${{ inputs.version }}" && exit 0 gh api \ --method POST \ -H "Accept: application/vnd.github+json" \