Skip to content

SDPLAT-26630: use github app in workflows #2293

SDPLAT-26630: use github app in workflows

SDPLAT-26630: use github app in workflows #2293

Workflow file for this run

name: pr
on:
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
Build:
name: Build
permissions:
statuses: write
pull-requests: write
uses: ./.github/workflows/_build.yml
secrets:
GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
BuildDocs:
name: Build Docs
permissions:
statuses: write
pull-requests: write
uses: ./.github/workflows/_build-docs.yml
Dependabot:
runs-on: ubuntu-22.04
permissions:
pull-requests: write
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- name: Fetch Dependabot metadata
id: dependabot-metadata
uses: dependabot/[email protected]
with:
github-token: "${{ steps.app-token.outputs.token }}"
- name: Add bpk label
if: contains(steps.dependabot-metadata.outputs.dependency-names, 'bpk-')
run: gh pr edit "$PR_URL" --add-label "bpk" --remove-label "javascript"
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
PR_URL: ${{github.event.pull_request.html_url}}