Scope app token to only this repo for security #770
Workflow file for this run
This file contains 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 auto-merge | |
on: pull_request_target | |
jobs: | |
dependabot: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} | |
steps: | |
- name: Generate token | |
id: generate_token | |
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 | |
with: | |
app_id: ${{ secrets.FETCH_METADATA_ACTION_AUTOMATION_APP_ID }} | |
private_key: ${{ secrets.FETCH_METADATA_ACTION_AUTOMATION_PRIVATE_KEY }} | |
repositories: "dependabot/fetch-metadata" | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Auto-merge | |
run: gh pr merge --auto --merge '${{ github.event.pull_request.html_url }}' | |
env: | |
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} |