Skip to content

Commit 97ddf02

Browse files
authored
github-actions: use ephemeral tokens (#2136)
1 parent 3c352cc commit 97ddf02

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/labeler.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ jobs:
1515
triage:
1616
runs-on: ubuntu-latest
1717
steps:
18+
- name: Get token
19+
id: get_token
20+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
21+
with:
22+
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
23+
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
24+
permissions: >-
25+
{
26+
"members": "read"
27+
}
1828
- name: Add agent-python label
1929
uses: actions-ecosystem/action-add-labels@v1
2030
with:
@@ -24,7 +34,7 @@ jobs:
2434
with:
2535
github-org: "elastic"
2636
github-user: ${{ github.actor }}
27-
github-token: ${{ secrets.APM_TECH_USER_TOKEN }}
37+
github-token: ${{ steps.get_token.outputs.token }}
2838
- name: Add community and triage labels
2939
if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'apmmachine'
3040
uses: actions-ecosystem/action-add-labels@v1

0 commit comments

Comments
 (0)