mirror of
https://github.com/simple-icons/simple-icons.git
synced 2025-01-05 01:20:39 +02:00
Authenticate with GitHub token in get-labels action (#10748)
This commit is contained in:
parent
f2cdbc3db5
commit
472d89f31d
5
.github/actions/get-labels/action.yml
vendored
5
.github/actions/get-labels/action.yml
vendored
@ -5,6 +5,9 @@ inputs:
|
||||
issue_number:
|
||||
description: Issue or pull request number to get labels from
|
||||
required: true
|
||||
github-token:
|
||||
description: GitHub token used to authenticate with the GitHub API
|
||||
default: ${{ secrets.GITHUB_TOKEN }}
|
||||
outputs:
|
||||
labels:
|
||||
description: Labels of the issue or pull request
|
||||
@ -15,6 +18,8 @@ runs:
|
||||
steps:
|
||||
- id: get-labels
|
||||
shell: sh
|
||||
env:
|
||||
GH_TOKEN: ${{ inputs.github-token }}
|
||||
run: |
|
||||
labels="$(gh api 'repos/simple-icons/simple-icons/issues/${{ inputs.issue_number }}' --jq '.labels.[].name' | tr '\n' ',')"
|
||||
echo "labels=$labels" >> $GITHUB_OUTPUT
|
||||
|
Loading…
Reference in New Issue
Block a user