-
-
Notifications
You must be signed in to change notification settings - Fork 21
46 lines (38 loc) · 1.44 KB
/
translation-changesets.yml
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
46
name: Translation Changesets
on:
pull_request:
types: [labeled, synchronize]
permissions:
contents: write
jobs:
build-translation-changesets:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'translations') && github.event.pull_request.user.login == 'studiocms-no-reply'
steps:
- name: Checkout Repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.STUDIOCMS_SERVICE_TOKEN }}
- name: Setup pnpm (corepack enabled)
uses: pnpm/action-setup@v3
- name: Setup Node.js 20.x
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
with:
node-version-file: '.node-version'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm ci:install
shell: bash
- name: Create Translation Changesets
run: pnpm translations:changeset
env:
CI_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5
with:
commit_message: '[ci] changesets'
branch: ${{ github.head_ref }}
commit_user_name: studiocms-no-reply
commit_user_email: [email protected]
commit_author: StudioCMS <[email protected]>