chore: generate configuration from supported-configurations.json #3216
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: "Dependabot Automation" | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| env: | |
| # Add Groups here to enable auto-merge for Dependabot PRs | |
| GROUPS: '["dev-minor-and-patch-dependencies", "gh-actions-packages", "test-versions"]' | |
| jobs: | |
| dependabot-automation: | |
| # Only run automation on the initial Dependabot-triggered run. If an automation commit is pushed | |
| # GitHub re-triggers this workflow with `github.actor == 'dd-octo-sts[bot]'`. We intentionally | |
| # avoid minting tokens / approving / enabling auto-merge on that follow-up run. | |
| if: github.event.pull_request.user.login == 'dependabot[bot]' && github.actor == 'dependabot[bot]' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3 | |
| id: octo-sts | |
| with: | |
| scope: DataDog/dd-trace-js | |
| policy: dependabot-automation | |
| - name: Dependabot metadata | |
| id: metadata | |
| uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # 2.5.0 | |
| with: | |
| github-token: "${{ steps.octo-sts.outputs.token }}" | |
| - name: Approve a PR | |
| if: contains(fromJSON(env.GROUPS), steps.metadata.outputs.dependency-group) | |
| run: gh pr review --approve "$PR_URL" | |
| env: | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| GH_TOKEN: ${{ steps.octo-sts.outputs.token }} | |
| - name: Enable auto-merge for Dependabot PRs | |
| if: contains(fromJSON(env.GROUPS), steps.metadata.outputs.dependency-group) | |
| run: gh pr merge --auto --squash "$PR_URL" | |
| env: | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| GH_TOKEN: ${{ steps.octo-sts.outputs.token }} |