Skip to content

Use actions/create-github-app-token in the Dependabot workflow #3055

Use actions/create-github-app-token in the Dependabot workflow

Use actions/create-github-app-token in the Dependabot workflow #3055

Workflow file for this run

name: Dependabot PR Actions
on:
pull_request:
types:
- opened
- reopened
- synchronize
- labeled
- unlabeled
jobs:
dependabot:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: GitHub App token
id: github_app_token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: ${{ steps.github_app_token.outputs.token }}
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Set up JDK 11
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'gradle'
- name: 'Setup: Java 11 env'
run: echo "JAVA11_HOME=$JAVA_HOME" >> $GITHUB_ENV
- name: Set up JDK 17
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: 'Setup: Java 17 env'
run: echo "JAVA17_HOME=$JAVA_HOME" >> $GITHUB_ENV
- name: Set up JDK 21
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: 'Setup: Java 21 env'
run: echo "JAVA21_HOME=$JAVA_HOME" >> $GITHUB_ENV
- name: Update Gradle SHAs
run: |
./gradlew updateSHAs
- name: Commit the changes
uses: stefanzweifel/git-auto-commit-action@bbd291750d2526367d915d5197485331dc2d8dc7 # v4.7.2
with:
commit_message: Updating SHAs
branch: ${{ github.head_ref }}
commit_user_name: dependabot[bot]
commit_user_email: support@github.com
commit_options: '--signoff'
- name: Update the changelog
uses: dangoslen/dependabot-changelog-helper@b50e4a0a947219edb0a51ca92b9d4a4fb4e2a66f # v2
with:
version: 'Unreleased'
- name: Commit the changes
uses: stefanzweifel/git-auto-commit-action@bbd291750d2526367d915d5197485331dc2d8dc7 # v4.7.2
with:
commit_message: "Update changelog"
branch: ${{ github.head_ref }}
commit_user_name: dependabot[bot]
commit_user_email: support@github.com
commit_options: '--signoff'