Auto-update registry versions #929
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto-update registry versions | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # At 04:31, every day | |
| - cron: 31 4 * * * | |
| # Declare default permissions as read only. | |
| permissions: read-all | |
| jobs: | |
| auto-update: | |
| name: Auto-update registry versions | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| # Remove the if statement below when testing against a fork | |
| if: github.repository == 'open-telemetry/opentelemetry.io' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Use CLA approved github bot | |
| run: | | |
| git config user.name otelbot | |
| git config user.email 197425009+otelbot@users.noreply.github.com | |
| - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 | |
| id: otelbot-token | |
| with: | |
| client-id: ${{ vars.OTELBOT_CLIENT_ID }} | |
| private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }} | |
| - name: Auto-update | |
| run: | | |
| .github/scripts/update-registry-versions.sh | |
| env: | |
| # change to ${{ secrets.GITHUB_TOKEN }} and comment out the step above when testing against a fork | |
| GH_TOKEN: ${{ steps.otelbot-token.outputs.token }} | |
| report-failure: | |
| needs: auto-update | |
| if: failure() && github.repository == 'open-telemetry/opentelemetry.io' | |
| uses: ./.github/workflows/reusable-report-failure.yml | |
| permissions: | |
| issues: write # Pass through for failure tracking issues | |
| contents: read |