-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (34 loc) · 1.46 KB
/
dependabot-changeset.yml
File metadata and controls
45 lines (34 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Dependabot Changeset
on: pull_request_target # zizmor: ignore[dangerous-triggers] Need write base reepo write access to commit the changeset. See warning below.
permissions: {}
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.number }}'
cancel-in-progress: true
jobs:
generate:
name: Generate
# IMPORTANT:
# NEVER REMOVE THIS CONDITION!
# We're using `pull_request_target` in order to have write access to the base repository
# so we'll be able to commit the changeset file.
# Removing the user check could give privileged access to a potential attacker.
if: |
github.event.pull_request.user.login == 'dependabot[bot]' &&
! contains(github.event.pull_request.title, 'development group')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source code # zizmor: ignore[artipacked] Need persisted token to commit the changeset.
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: Install Dependencies
uses: ./.github/actions/install
- name: Configure git user
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Generate changeset
run: node .github/scripts/generate-dependabot-changeset.ts