diff --git a/.github/workflows/check-external-links.yml b/.github/workflows/check-external-links.yml index 99ed0dfbd681..935873856147 100644 --- a/.github/workflows/check-external-links.yml +++ b/.github/workflows/check-external-links.yml @@ -12,6 +12,7 @@ defaults: run: shell: bash +permissions: write-all # since narrower scopes don't work ... concurrency: group: ${{ github.workflow }} # do not allow any concurrency or the different builds will risk creating multiple issues @@ -19,14 +20,19 @@ concurrency: jobs: build: runs-on: ubuntu-latest - permissions: write-all # since narrower scopes don't work ... steps: - uses: actions/checkout@v3 - - name: Get current date - id: date + - name: Create issue using REST API run: | - echo "month=$(date +'%Y-%m')" >> "$GITHUB_OUTPUT" - echo "day=$(date +'%d')" >> "$GITHUB_OUTPUT" + 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 - name: Restoring cached GitHub API results uses: actions/cache@v3 with: