feat(renovate): onboard Renovate with fleet-standard config #108
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
| --- | ||
|
Check failure on line 1 in .github/workflows/auto-merge.yml
|
||
| # Front-Matter for GitHub Workflow | ||
| title: "Renovate Auto-Merge" | ||
| name: "auto-merge.yml" | ||
| description: "Automatically approve and merge renovate pull requests when labeled" | ||
| category: ci | ||
| usage: "Trigger on renovate pull request events (opened, labeled, synchronize)" | ||
| behavior: "Approves and auto-merges PRs created by renovate[bot]" | ||
| inputs: "GitHub pull_request event payload; secrets: GITHUB_TOKEN" # pragma: allowlist secret | ||
| outputs: "PR merged status" | ||
| dependencies: "step-security/harden-runner@v2.12, gh CLI" | ||
| author: "Byron Williams" | ||
| last_modified: "2023-11-15" | ||
| changelog: "Converted to front-matter format according to annotation spec" | ||
| tags: [automation, dependabot] | ||
| --- | ||
| name: Renovate Auto-Merge | ||
| on: | ||
| pull_request: | ||
| types: [opened, labeled, synchronize] | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| jobs: | ||
| auto-merge: | ||
| if: github.actor == 'renovate[bot]' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Harden the runner (Audit all outbound calls) | ||
| uses: step-security/harden-runner@v2.12 | ||
| with: | ||
| egress-policy: audit | ||
| - name: Approve the PR | ||
| run: | | ||
| gh pr review --approve "$PR_URL" | ||
| env: | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Enable auto-merge | ||
| run: | | ||
| gh pr merge --auto --merge "$PR_URL" | ||
| env: | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||