mirror of
https://github.com/Mibew/simple-icons.git
synced 2025-04-07 21:30:16 +03: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:
|
issue_number:
|
||||||
description: Issue or pull request number to get labels from
|
description: Issue or pull request number to get labels from
|
||||||
required: true
|
required: true
|
||||||
|
github-token:
|
||||||
|
description: GitHub token used to authenticate with the GitHub API
|
||||||
|
default: ${{ secrets.GITHUB_TOKEN }}
|
||||||
outputs:
|
outputs:
|
||||||
labels:
|
labels:
|
||||||
description: Labels of the issue or pull request
|
description: Labels of the issue or pull request
|
||||||
@ -15,6 +18,8 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- id: get-labels
|
- id: get-labels
|
||||||
shell: sh
|
shell: sh
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ inputs.github-token }}
|
||||||
run: |
|
run: |
|
||||||
labels="$(gh api 'repos/simple-icons/simple-icons/issues/${{ inputs.issue_number }}' --jq '.labels.[].name' | tr '\n' ',')"
|
labels="$(gh api 'repos/simple-icons/simple-icons/issues/${{ inputs.issue_number }}' --jq '.labels.[].name' | tr '\n' ',')"
|
||||||
echo "labels=$labels" >> $GITHUB_OUTPUT
|
echo "labels=$labels" >> $GITHUB_OUTPUT
|
||||||
|
Loading…
Reference in New Issue
Block a user