github.com/grafana/pyroscope@v1.18.0/.github/workflows/update-make-docs.yml (about) 1 name: Update `make docs` procedure 2 3 permissions: {} 4 5 on: 6 schedule: 7 - cron: '0 7 * * 1-5' 8 workflow_dispatch: 9 jobs: 10 main: 11 if: github.repository == 'grafana/pyroscope' 12 permissions: 13 contents: read 14 id-token: write 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 - name: Generate token 28 id: generate_token 29 uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 30 with: 31 app-id: ${{ env.GITHUB_APP_ID }} 32 private-key: ${{ env.GITHUB_APP_PRIVATE_KEY }} 33 owner: ${{ github.repository_owner }} 34 permission-contents: write 35 permission-pull-requests: write 36 repositories: | 37 pyroscope 38 - name: Get GitHub App User ID 39 id: get-user-id 40 env: 41 GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} 42 run: | 43 APP_BOT="${{ steps.generate_token.outputs.app-slug }}[bot]" 44 echo "user-id=$(gh api "/users/${APP_BOT}" --jq .id)" >> "$GITHUB_OUTPUT" 45 - name: Configure git remote 46 run: | 47 APP_BOT="${{ steps.generate_token.outputs.app-slug }}[bot]" 48 git config --local user.name "${APP_BOT}" 49 git config --local user.email "${{ steps.get-user-id.outputs.user-id }}+${APP_BOT}@users.noreply.github.com" 50 git remote set-url "origin" https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/${{ github.repository }}.git > /dev/null 2> /dev/null 51 - uses: grafana/writers-toolkit/update-make-docs@9cd40a7f81073bfcad984f1e93dc89eae8a9b464 52 with: 53 pr_options: > 54 --label type/docs 55 token: ${{ steps.generate_token.outputs.token }} 56 trace: true