github.com/grafana/pyroscope@v1.18.0/.github/workflows/update-examples-cron.yml (about) 1 name: Update Examples Cron 2 3 on: 4 schedule: 5 - cron: '0 */8 * * *' 6 workflow_dispatch: 7 8 permissions: 9 contents: read 10 id-token: write 11 12 jobs: 13 update-examples-cron: 14 if: github.repository == 'grafana/pyroscope' 15 runs-on: ${{ github.repository_owner == 'grafana' && 'ubuntu-x64-small' || 'ubuntu-latest' }} 16 steps: 17 - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 18 with: 19 persist-credentials: 'false' 20 - id: get-secrets 21 uses: grafana/shared-workflows/actions/get-vault-secrets@bae259f9ed5b6fcb050e3b58adf7aee776d4edb5 22 with: 23 repo_secrets: | 24 GITHUB_APP_ID=pyroscope-development-app:app-id 25 GITHUB_APP_INSTALLATION_ID=pyroscope-development-app:app-installation-id 26 GITHUB_APP_PRIVATE_KEY=pyroscope-development-app:private-key 27 28 - name: Generate token 29 id: generate_token 30 uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 31 with: 32 app-id: ${{ env.GITHUB_APP_ID }} 33 private-key: ${{ env.GITHUB_APP_PRIVATE_KEY }} 34 owner: ${{ github.repository_owner }} 35 repositories: | 36 pyroscope 37 38 - run: | 39 make tools/update_examples 40 if ! git diff --exit-code; 41 then 42 make tools/update_examples_pr 43 fi 44 env: 45 GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} 46 GITHUB_REPOSITORY: ${{ github.repository }}