|
5 | 5 | types: [opened, synchronize, labeled] |
6 | 6 | branches: |
7 | 7 | - main |
8 | | - |
9 | | -permissions: |
10 | | - contents: read |
11 | | - pull-requests: write |
| 8 | + paths: |
| 9 | + - '**/package.json' |
| 10 | + - 'pnpm-lock.yaml' |
| 11 | + - 'pnpm-workspace.yaml' |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - renovate-changeset: |
15 | | - if: > |
16 | | - github.event.pull_request.user.login == 'renovate[bot]' && |
17 | | - contains(github.event.pull_request.labels.*.name, '🤖 Type: Dependencies') |
18 | | - runs-on: ubuntu-latest |
19 | | - timeout-minutes: 10 |
20 | | - |
21 | | - steps: |
22 | | - # Get GitHub token via the CT Changesets App so the resulting push |
23 | | - # re-triggers required status checks (the default GITHUB_TOKEN cannot). |
24 | | - - name: Generate GitHub token (via CT Changesets App) |
25 | | - id: generate_github_token |
26 | | - uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 |
27 | | - with: |
28 | | - app_id: ${{ secrets.CT_CHANGESETS_APP_ID }} |
29 | | - private_key: ${{ secrets.CT_CHANGESETS_APP_PEM }} |
30 | | - |
31 | | - # This action talks entirely to the GitHub API (reads PR files/commits |
32 | | - # and writes the changeset via the Contents API) - no checkout needed. |
33 | | - - name: Add changeset for dependency update |
34 | | - id: add_changeset |
35 | | - uses: mscharley/dependency-changesets-action@874dac2372a085cb94f750e8bdf5b1173a838a75 # v1.2.5 |
36 | | - with: |
37 | | - token: ${{ steps.generate_github_token.outputs.token }} |
38 | | - # Renovate's default commit prefix is "chore(deps): ...", which |
39 | | - # conventional-commit parsing treats as a non-releasable change |
40 | | - # (only fix/feat/breaking map to a bump type). Disable it so every |
41 | | - # dependency update gets a patch-level changeset instead of being |
42 | | - # silently skipped. |
43 | | - use-conventional-commits: false |
44 | | - commit-message: "chore(deps): add changeset for dependency update" |
45 | | - author-name: "github-actions[bot]" |
46 | | - author-email: "41898282+github-actions[bot]@users.noreply.github.com" |
47 | | - |
48 | | - # The action no-ops (and leaves this output unset/false) when a |
49 | | - # changeset already exists for the PR, e.g. on the re-run its own |
50 | | - # commit triggers via `synchronize`. Only label on an actual write. |
51 | | - - name: Label PR when a changeset was added |
52 | | - if: steps.add_changeset.outputs.created-changeset == 'true' |
53 | | - env: |
54 | | - GH_TOKEN: ${{ github.token }} |
55 | | - run: | |
56 | | - gh pr edit "${{ github.event.pull_request.number }}" \ |
57 | | - --repo "${{ github.repository }}" \ |
58 | | - --add-label "changeset-added" |
| 14 | + changeset: |
| 15 | + uses: commercetools/merchant-center-application-kit/.github/workflows/renovate-changeset.yml@main |
| 16 | + with: |
| 17 | + package-dirs: 'packages' |
| 18 | + secrets: inherit |
0 commit comments