From 8b7a068bfc79caacf898a8044d6dfdc506b0a6cc Mon Sep 17 00:00:00 2001 From: Fabiana Campanari <113218619+FabianaCampanari@users.noreply.github.com> Date: Tue, 9 Apr 2024 13:18:18 -0300 Subject: [PATCH] Create action-restAPI.yml Signed-off-by: Fabiana Campanari <113218619+FabianaCampanari@users.noreply.github.com> --- .github/workflows/action-restapi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/action-restapi diff --git a/.github/workflows/action-restapi b/.github/workflows/action-restapi new file mode 100644 index 0000000..a30c3dd --- /dev/null +++ b/.github/workflows/action-restapi @@ -0,0 +1,21 @@ +name: Create issue on commit + +on: [ push ] + +jobs: + create_issue: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Create issue using REST API + run: | + curl --request POST \ + --url https://api.github.com/repos/${{ github.repository }}/issues \ + --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + --header 'content-type: application/json' \ + --data '{ + "title": "Automated issue for commit: ${{ github.sha }}", + "body": "This issue was automatically created by the GitHub Action workflow **${{ github.workflow }}**. \n\n The commit hash was: _${{ github.sha }}_." + }' \ + --fail