Skip to content

Commit 9178fa4

Browse files
committed
Merge branch 'r/18.x' into develop
2 parents 328d8a7 + 5650bed commit 9178fa4

13 files changed

+142
-104
lines changed

.github/workflows/check-icla.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: Check ICLA
1+
name: Check » ICLA
22
on:
33
pull_request_target:
44
types:
55
- opened
66

77
jobs:
8-
main:
8+
check-icla:
99
if: github.event.pull_request.user.login != 'dependabot[bot]'
1010
runs-on: ubuntu-24.04
1111
steps:

.github/workflows/check-label.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# This workflow runs on any change made to a pull-request and aims to verify
22
# that the correct label is present.
33

4-
name: Check proper label usage
4+
name: Check » Proper label usage
55

66
on:
77
pull_request_target:
88
types: [opened, labeled, unlabeled, synchronize]
99

1010
jobs:
11-
labels:
11+
check-labels:
1212
runs-on: ubuntu-latest
1313
steps:
1414
# Ensure that one of the required labels is present and none of the undesired is absent

.github/workflows/check-merge-conflict.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Merge conflict check
1+
name: Check » Merge conflicts
22
on:
33
push:
44
pull_request_target:
@@ -7,7 +7,7 @@ on:
77
- synchronize
88

99
jobs:
10-
main:
10+
check-merge-conflicts:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Check for dirty pull requests
@@ -18,4 +18,4 @@ jobs:
1818
commentOnDirty: |
1919
This pull request has conflicts ☹
2020
Please resolve those so we can review the pull request.
21-
Thanks.
21+
Thanks.

.github/workflows/crowdin-download-translations.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,33 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
update-translations:
9+
download-translations:
1010
if: github.repository_owner == 'opencast'
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v5
1414

15-
- name: prepare git
15+
- name: Prepare git
1616
run: |
1717
git config --global user.email 'crowdin-bot@opencast.org'
1818
git config --global user.name 'Crowdin Bot'
1919
20-
- name: prepare crowdin client
20+
- name: Prepare crowdin client
2121
run: |
2222
wget --quiet https://artifacts.crowdin.com/repo/deb/crowdin3.deb -O crowdin.deb
2323
sudo dpkg -i crowdin.deb
2424
25-
- name: download translations
25+
- name: Download translations
2626
env:
2727
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
2828
run: |
2929
crowdin download --config .crowdin.yaml -b main
3030
31-
- name: add new translations
31+
- name: Add new translations
3232
run: |
3333
git add src/i18n/org/opencastproject/adminui/languages/
3434
35-
- name: upload translations
35+
- name: Upload translations
3636
run: |
3737
if git commit -m "Automatically update translation keys"; then
3838
git push

.github/workflows/crowdin-upload-keys.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
deploy-translation-keys:
14+
upload-translation-keys:
1515
if: github.repository_owner == 'opencast'
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v5
1919

20-
- name: prepare crowdin client
20+
- name: Prepare crowdin client
2121
run: |
2222
wget --quiet https://artifacts.crowdin.com/repo/deb/crowdin3.deb
2323
sudo dpkg -i crowdin3.deb
2424
25-
- name: upload translation source
25+
- name: Upload translation source
2626
env:
2727
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
2828
run: |

.github/workflows/deploy-main.yml renamed to .github/workflows/deploy-main-branches.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build & Deploy main brances
1+
name: Build » Deploy main branches
22

33
on:
44
push:
@@ -11,7 +11,7 @@ concurrency:
1111
cancel-in-progress: false
1212

1313
jobs:
14-
detect:
14+
detect-repo-owner:
1515
if: github.repository_owner == 'opencast'
1616
runs-on: ubuntu-latest
1717
outputs:
@@ -33,32 +33,32 @@ jobs:
3333
#Strip the r/ prefix, giving us just 17.x. If this is main/develop this does nothing
3434
echo "branch=${TEMP#r\/}" >> $GITHUB_OUTPUT
3535
36-
main:
36+
deploy-main-branches:
3737
runs-on: ubuntu-latest
38-
needs: detect
38+
needs: detect-repo-owner
3939
steps:
40-
- name: checkout code
40+
- name: Checkout sources
4141
uses: actions/checkout@v5
4242

43-
- name: get node.js
43+
- name: Get Node.js
4444
uses: actions/setup-node@v5
4545
with:
4646
node-version: 20
4747

48-
- name: download dependencies
48+
- name: Run npm ci
4949
run: npm ci
5050

51-
- name: build project
51+
- name: Build the app
5252
run: |
5353
npm run build
5454
env:
55-
VITE_TEST_SERVER_URL: ${{needs.detect.outputs.server}}
55+
VITE_TEST_SERVER_URL: ${{needs.detect-repo-owner.outputs.server}}
5656
NODE_ENV: development
5757
VITE_TEST_SERVER_AUTH: "admin:opencast"
5858

5959
- name: Prepare git
6060
run: |
61-
git config --global user.name "Release Bot"
61+
git config --global user.name "Admin Interface Deployment Bot"
6262
git config --global user.email "cloud@opencast.org"
6363
6464
- name: Commit new version
@@ -81,7 +81,7 @@ jobs:
8181
git add $BRANCH index.html
8282
git diff --staged --quiet || git commit --amend -m "Build $(date)"
8383
env:
84-
BRANCH: ${{needs.detect.outputs.branch}}
84+
BRANCH: ${{needs.detect-repo-owner.outputs.branch}}
8585

8686
- name: update CSS and other assets
8787
if: github.ref == 'refs/heads/develop'

.github/workflows/deploy-container-image.yaml renamed to .github/workflows/pr-deploy-container-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish container image
1+
name: PRs » Publish container image
22

33
on:
44
push:

.github/workflows/deploy-test.yml renamed to .github/workflows/pr-deploy-test-branch.yml

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Pull Request Page
1+
name: PRs » Publish Pull Request Page
22

33
on:
44
pull_request_target:
@@ -11,8 +11,8 @@ concurrency:
1111
cancel-in-progress: false
1212

1313
jobs:
14-
detect:
15-
if: ${{ github.event.pull_request.head.repo.full_name == 'opencast/opencast-admin-interface' }}
14+
detect-repo-owner:
15+
if: github.repository_owner == 'opencast'
1616
runs-on: ubuntu-latest
1717
outputs:
1818
server: ${{ steps.test-server.outputs.server }}
@@ -36,42 +36,42 @@ jobs:
3636
#Strip the r/ prefix, giving us just 17.x. If this is main/develop this does nothing
3737
echo "branch=${TEMP#r\/}" >> $GITHUB_OUTPUT
3838
39-
main:
39+
deploy-pr:
4040
runs-on: ubuntu-latest
41-
needs: detect
41+
needs: detect-repo-owner
4242
steps:
43-
- name: generate build path
43+
- name: Generate build path
4444
run: echo "build=${{github.event.number}}/$(date +%Y-%m-%d_%H-%M-%S)/" >> $GITHUB_OUTPUT
4545
id: build-path
4646

47-
- name: checkout code
47+
- name: Checkout sources
4848
uses: actions/checkout@v5
4949
with:
5050
ref: ${{github.event.pull_request.head.ref}}
5151
repository: ${{github.event.pull_request.head.repo.full_name}}
5252

53-
- name: get node.js
53+
- name: Get Node.js
5454
uses: actions/setup-node@v5
5555
with:
5656
node-version: 20
5757

58-
- name: download dependencies
58+
- name: Run npm ci
5959
run: npm ci
6060

61-
- name: build app
61+
- name: Build the app
6262
run: |
6363
npm run build
6464
env:
65-
VITE_TEST_SERVER_URL: ${{needs.detect.outputs.server}}
65+
VITE_TEST_SERVER_URL: ${{needs.detect-repo-owner.outputs.server}}
6666
NODE_ENV: development
6767
VITE_TEST_SERVER_AUTH: "admin:opencast"
6868

69-
- name: prepare git
69+
- name: Prepare git
7070
run: |
7171
git config --global user.name "Admin Interface Deployment Bot"
7272
git config --global user.email "cloud@opencast.org"
7373
74-
- name: prepare GitHub SSH key
74+
- name: Prepare GitHub SSH key from org level secret
7575
env:
7676
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY_TEST }}
7777
run: |
@@ -80,18 +80,18 @@ jobs:
8080
chmod 600 ~/.ssh/id_ed25519
8181
ssh-keyscan github.com >> ~/.ssh/known_hosts
8282
83-
- name: wait for previous workflows to finish
83+
- name: Wait for previous workflows to finish
8484
uses: softprops/turnstyle@v3
8585
with:
8686
same-branch-only: false
8787
env:
8888
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8989

90-
- name: clone repository
90+
- name: Clone repository
9191
run: |
9292
git clone -b gh-pages "git@github.com:${{ github.repository_owner }}/opencast-admin-interface-test.git" admin-interface-test
9393
94-
- name: store build
94+
- name: Store build in the clone
9595
env:
9696
DEPLOY_PATH: admin-interface-test/${{ steps.build-path.outputs.build }}
9797
run: |
@@ -108,7 +108,7 @@ jobs:
108108
rm -f cleanup-deployments.sh
109109
git add .
110110
111-
- name: generate index.html
111+
- name: Generate index.html
112112
working-directory: admin-interface-test
113113
run: |
114114
echo '<html><body><ul>' > index.html
@@ -117,18 +117,18 @@ jobs:
117117
| sed 's/^\(.*\)$/<li><a href=\1>\1<\/a><\/li>/' >> index.html
118118
echo '</ul></body></html>' >> index.html
119119
120-
- name: commit new version
120+
- name: Commit new version
121121
working-directory: admin-interface-test
122122
run: |
123123
git add .
124124
git commit --amend -m "Build ${{ steps.build-path.outputs.build }}"
125125
126-
- name: push updates
126+
- name: Force push admin interface test branch
127127
working-directory: admin-interface-test
128128
run: |
129129
git push origin gh-pages --force
130130
131-
- name: add comment with deployment location
131+
- name: Add comment with deployment location
132132
uses: thollander/actions-comment-pull-request@v3
133133
with:
134134
comment-tag: static-test-deployment
@@ -138,3 +138,27 @@ jobs:
138138
](https://test.admin-interface.opencast.org/${{ steps.build-path.outputs.build }}).
139139
140140
It might take a few minutes for it to become available.
141+
142+
check-no-modified-translations:
143+
name: Translations only via Crowdin
144+
if: github.repository_owner == 'opencast'
145+
runs-on: ubuntu-latest
146+
147+
steps:
148+
- name: Checkout Sources
149+
uses: actions/checkout@v4
150+
151+
- name: Get changed locale files
152+
uses: dorny/paths-filter@v3
153+
id: filter_locales
154+
with:
155+
filters: | # !(pattern) matches anything but pattern
156+
locales:
157+
- 'src/i18n/org/opencastproject/adminui/languages/!lang-(en_US)*.json'
158+
159+
- name: Check for changes in translations
160+
if: steps.filter_locales.outputs.locales == true
161+
uses: actions/github-script@v7
162+
with:
163+
script: |
164+
core.setFailed('You should not alter translations outside of Crowdin.')

0 commit comments

Comments
 (0)