Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try example from docs #460

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading