Skip to content

Commit bc8e23c

Browse files
committed
chore: Reactivate update-contributors workflow
1 parent 9bc2847 commit bc8e23c

File tree

2 files changed

+53
-32
lines changed

2 files changed

+53
-32
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Update Contributors in README
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 1-7 * SUN'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
id-token: write
11+
12+
jobs:
13+
update-contributors:
14+
if: github.repository == 'grafana/pyroscope'
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+
with:
20+
persist-credentials: 'false'
21+
- id: get-secrets
22+
uses: grafana/shared-workflows/actions/get-vault-secrets@28361cdb22223e5f1e34358c86c20908e7248760
23+
with:
24+
repo_secrets: |
25+
GITHUB_APP_ID=pyroscope-development-app:app-id
26+
GITHUB_APP_INSTALLATION_ID=pyroscope-development-app:app-installation-id
27+
GITHUB_APP_PRIVATE_KEY=pyroscope-development-app:private-key
28+
29+
- name: Generate token
30+
id: generate_token
31+
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
32+
with:
33+
app-id: ${{ env.GITHUB_APP_ID }}
34+
private-key: ${{ env.GITHUB_APP_PRIVATE_KEY }}
35+
owner: ${{ github.repository_owner }}
36+
repositories: |
37+
pyroscope
38+
- uses: actions/setup-go@v5
39+
with:
40+
go-version: 1.23.11
41+
- name: Update contributors
42+
run: make update-contributors
43+
44+
- name: Commit and push changes
45+
run: |
46+
git config --local user.name 'Pyroscope Bot'
47+
git config --local user.email '[email protected]'
48+
if ! git diff --exit-code README.md; then
49+
git add README.md
50+
git commit -m 'docs: updates the list of contributors in README'
51+
gh auth status
52+
git push --force https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/${{ github.repository }}.git HEAD:main 2> /dev/null
53+
fi

.github/workflows_disabled/update-contributors.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)