From 9d28d72329078e3e11e47b9fab79668357898219 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Tue, 8 Oct 2024 07:25:42 +0000 Subject: [PATCH] chore: create issue when new patch is available --- .github/workflows/check-latest-node.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/check-latest-node.yml b/.github/workflows/check-latest-node.yml index e538583d..1a01014c 100644 --- a/.github/workflows/check-latest-node.yml +++ b/.github/workflows/check-latest-node.yml @@ -49,3 +49,14 @@ jobs: -H "Accept: application/vnd.github.v3+json" \ https://api.github.com/repos/${{ github.repository }}/actions/workflows/patch-node.yml/dispatches \ -d '{"ref":"main","inputs":{"nodeVersion":"${{ steps.compare.outputs.latest_version }}","patchFile":"${{ steps.compare.outputs.patch_version }}"}}' + + # create new issue if patch is outdated + - name: Create issue + if: steps.compare.outputs.outdated == 'true' + run: | + echo "Creating issue for outdated patch for Node.js ${{ matrix.node-version }}" + curl -X POST \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/${{ github.repository }}/issues \ + -d '{"title":"Bump patch for Node.js from ${{ steps.compare.outputs.patch_version }} to ${{ steps.compare.outputs.latest_version }}","body":"The patch for Node.js ${{ matrix.node-version }} is outdated. Please create a new patch."}'