Skip to content

Commit

Permalink
Try example from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
holly-cummins committed Nov 16, 2023
1 parent 0e205e3 commit 4b54528
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/check-external-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@ 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

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:
Expand Down

0 comments on commit 4b54528

Please sign in to comment.