-
Notifications
You must be signed in to change notification settings - Fork 622
45 lines (39 loc) · 1.24 KB
/
update-examples-cron.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Update Examples Cron
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
update-examples-cron:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
repo_secrets: |
GITHUB_APP_ID=pyroscope-development-app:app-id
GITHUB_APP_INSTALLATION_ID=pyroscope-development-app:app-installation-id
GITHUB_APP_PRIVATE_KEY=pyroscope-development-app:app-private-key
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ env.GITHUB_APP_ID }}
installation_retrieval_mode: id
installation_retrieval_payload: ${{ env.GITHUB_APP_INSTALLATION_ID }}
private_key: ${{ env.GITHUB_APP_PRIVATE_KEY }}
- run: |
make tools/update_examples
if ! git diff --exit-code;
then
make tools/update_examples_pr
fi
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
GITHUB_REPOSITORY: ${{ github.repository }}