Skip to content

Commit 34e1856

Browse files
committed
Merge remote-tracking branch 'origin/develop' into 296-terms-of-use
2 parents 9ba71c8 + 14e1e59 commit 34e1856

677 files changed

Lines changed: 30003 additions & 49664 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/demo-page.html

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ updates:
1717
open-pull-requests-limit: 15
1818
labels:
1919
- type:dependencies
20+
groups:
21+
minor-and-patch:
22+
update-types:
23+
- minor
24+
- patch

.github/get-release-server.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
if [ $# -ne 1 ]; then
4+
echo "Usage: $0 OC_VERSION"
5+
echo " eg: $0 r/16.x -> Returns the current correct server for r/16.x"
6+
exit 1
7+
fi
8+
9+
git clone https://github.com/opencast/opencast.git ~/opencast
10+
cd ~/opencast
11+
12+
#Get the list of *all* branches in the format remotes/origin/r/N.m
13+
#grep for r/N.x
14+
#then use cut to remove remotes/origin
15+
#then use sort, with a field delimiter of '/', sorting on the *second* key in 'n'umeric 'r'evers order
16+
#then only consider the first 3 entries
17+
ary=( develop `git branch -a | grep origin | grep 'r/[0-9]*.x' | cut -f 3- -d '/' | sort -t '/' -k 2nr | head -n 3` )
18+
19+
#Iterate through the array above.
20+
#If the script input matches the first item, spit out develop
21+
#If the script iput matches hte second item... etc
22+
#If it doesn't match anything, then don't say anything
23+
for i in "${!ary[@]}"
24+
do
25+
if [[ "${ary[i]}" = "$1" ]]; then
26+
if [[ $i -eq 0 ]]; then
27+
echo "develop.opencast.org"
28+
exit 0
29+
elif [[ $i -eq 1 ]]; then
30+
echo "stable.opencast.org"
31+
exit 0
32+
elif [[ $i -eq 2 ]]; then
33+
echo "legacy.opencast.org"
34+
exit 0
35+
fi
36+
fi
37+
done

.github/workflows/check-icla.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ on:
77
jobs:
88
main:
99
if: github.event.pull_request.user.login != 'dependabot[bot]'
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-24.04
1111
steps:
1212
- name: Install Python module
13-
run: pip install apereocla
13+
run: pip install --break-system-packages apereocla
1414

1515
- name: Check Apereo ICLA for GitHub user
1616
run: apereocla -g "${{ github.event.pull_request.user.login }}"
@@ -23,7 +23,7 @@ jobs:
2323
message: >
2424
Hi @${{ github.event.pull_request.user.login }}
2525
26-
Thank you for contributing to the Opencast Editor.
26+
Thank you for contributing to the Opencast Admin UI.
2727
2828
We noticed that you have not yet filed an [Individual Contributor License Agreement](https://www.apereo.org/licensing/agreements/icla).
2929
Doing that (once) helps us to ensure that Opencast stays free for all.

.github/workflows/check-label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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 lable usage
4+
name: Check proper label usage
55

66
on:
77
pull_request_target:
Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,36 @@
11
on:
2-
push:
3-
tags:
4-
- '*-*-*'
2+
workflow_dispatch:
53

6-
name: Create release draft
4+
name: Create release tag
75

86
jobs:
97
build:
10-
name: Create release from tag
8+
name: Create release tag
119
runs-on: ubuntu-latest
1210
steps:
1311
- name: checkout code
1412
uses: actions/checkout@v4
15-
16-
- name: get node.js
17-
uses: actions/setup-node@v4
1813
with:
19-
node-version: 20
14+
fetch-depth: 0
2015

21-
- name: download dependencies
22-
run: npm ci
16+
- name: prepare git
17+
run: |
18+
git config --global user.email 'cloud@opencast.org'
19+
git config --global user.name 'Release Bot'
2320
24-
- name: build release
21+
- name: tag and push
2522
env:
26-
PUBLIC_URL: /admin-ui
27-
run: npm run build
28-
29-
- name: create release tarball
30-
working-directory: build
31-
run: tar -czf "../oc-admin-ui-$(date -u +%F).tar.gz" *
32-
33-
- name: create new release
34-
uses: softprops/action-gh-release@v2
35-
with:
36-
files: ./oc-admin-ui-*.tar.gz
37-
draft: true
38-
fail_on_unmatched_files: true
39-
generate_release_notes: true
23+
GH_TOKEN: ${{ github.token }}
24+
run: |
25+
#Translate 'develop' to 18.x or whatever is appropriate
26+
if [ "develop" == "${{ github.ref_name }}" ]; then
27+
#NB normally we only clone just the head ref, but fetch-depth: 0 above gets *all* the history
28+
export TEMP="$((`git branch -a | grep r/ | cut -f 4 -d '/' | cut -f 1 -d '.'` + 1)).x"
29+
else
30+
export TEMP=${{ github.ref_name }}
31+
fi
32+
export TAG=${TEMP#r\/}-`date +%Y-%m-%d`
33+
git tag $TAG
34+
git push origin $TAG
35+
sleep 2
36+
gh workflow run process-release.yml -r $TAG

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: Crowdin » Upload keys
33
on:
44
push:
55
branches:
6-
- main
6+
- develop
7+
- r/*
78

89
concurrency:
910
group: crowdin-${{ github.ref }}
@@ -25,4 +26,4 @@ jobs:
2526
env:
2627
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
2728
run: |
28-
crowdin upload sources --config .crowdin.yaml -b main
29+
crowdin upload sources --config .crowdin.yaml -b "${GITHUB_REF##*/}"

.github/workflows/deploy-container-image.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
ref: ${{ github.event.pull_request.head.ref }}
2323
repository: ${{ github.event.pull_request.head.repo.full_name }}
2424

25+
- name: Prepare commit hash
26+
run: git rev-parse HEAD > commit
27+
2528
- name: Log in to the container registry
2629
uses: docker/login-action@v3
2730
with:
@@ -45,9 +48,9 @@ jobs:
4548

4649
- name: Add comment
4750
if: github.event_name == 'pull_request_target'
48-
uses: thollander/actions-comment-pull-request@v2
51+
uses: thollander/actions-comment-pull-request@v3
4952
with:
50-
comment_tag: container-image
53+
comment-tag: container-image
5154
message: |
5255
Use `docker` or `podman` to test this pull request locally.
5356

.github/workflows/deploy-main.yml

Lines changed: 58 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,41 @@
1-
name: Publish Test Page
1+
name: Build & Deploy main brances
22

33
on:
44
push:
55
branches:
6-
- main
6+
- develop
7+
- r/*
78

89
concurrency:
9-
group: ${{ github.workflow }}-${{ github.ref }}
10-
cancel-in-progress: true
10+
group: ${{ github.workflow }}
11+
cancel-in-progress: false
1112

1213
jobs:
13-
build:
14+
detect:
1415
if: github.repository_owner == 'opencast'
1516
runs-on: ubuntu-latest
17+
outputs:
18+
server: ${{ steps.test-server.outputs.server }}
19+
branch: ${{ steps.branch-name.outputs.branch }}
20+
steps:
21+
- name: Checkout sources
22+
uses: actions/checkout@v4
23+
24+
- name: Determine the correct test server
25+
id: test-server
26+
run: echo "server=https://`./.github/get-release-server.sh ${{ github.ref_name }}`" >> $GITHUB_OUTPUT
27+
28+
- name: Determine branch name
29+
id: branch-name
30+
run: |
31+
#Temp becomes something like r/17.x
32+
export TEMP=${{ github.ref_name }}
33+
#Strip the r/ prefix, giving us just 17.x. If this is main/develop this does nothing
34+
echo "branch=${TEMP#r\/}" >> $GITHUB_OUTPUT
35+
36+
main:
37+
runs-on: ubuntu-latest
38+
needs: detect
1639
steps:
1740
- name: checkout code
1841
uses: actions/checkout@v4
@@ -26,40 +49,37 @@ jobs:
2649
run: npm ci
2750

2851
- name: build project
29-
run: npm run build
52+
run: |
53+
npm run build
54+
env:
55+
VITE_TEST_SERVER_URL: ${{needs.detect.outputs.server}}
56+
NODE_ENV: development
57+
VITE_TEST_SERVER_AUTH: "admin:opencast"
3058

31-
- name: create pages directory
32-
run: mkdir gh-pages
3359

34-
- name: include admin interface
35-
run: mv build gh-pages/admin-ui
60+
- name: Prepare git
61+
run: |
62+
git config --global user.name "Release Bot"
63+
git config --global user.email "cloud@opencast.org"
3664
37-
- name: include mock data
38-
working-directory: ./gh-pages
39-
run: cp -rv ../test/GET/* .
65+
- name: Commit new version
66+
run: |
67+
git fetch --unshallow origin gh-pages
68+
git checkout gh-pages
69+
# Update gh-pages
70+
rm -rf $BRANCH
71+
mv build $BRANCH
72+
#Generate an index, in case anyone lands at the root of the test domain
73+
echo '<html><body><ul>' > index.html
74+
find . -mindepth 1 -maxdepth 1 -type d \
75+
| grep '[0-9]*.x\|develop' \
76+
| sort -r \
77+
| sed 's/^\(.*\)$/<li><a href=\1>\1<\/a><\/li>/' >> index.html
78+
echo '</ul></body></html>' >> index.html
79+
git add $BRANCH index.html
80+
git diff --staged --quiet || git commit --amend -m "Build $(date)"
81+
env:
82+
BRANCH: ${{needs.detect.outputs.branch}}
4083

41-
- name: include landing page
42-
run: cp .github/demo-page.html gh-pages/index.html
43-
44-
- name: upload test page artifact
45-
uses: actions/upload-pages-artifact@v3
46-
with:
47-
path: ./gh-pages
48-
49-
deploy:
50-
if: github.repository_owner == 'opencast'
51-
needs: build
52-
53-
permissions:
54-
pages: write
55-
id-token: write
56-
57-
environment:
58-
name: github-pages
59-
url: ${{ steps.deployment.outputs.page_url }}
60-
61-
runs-on: ubuntu-latest
62-
steps:
63-
- name: deploy to GitHub Pages
64-
id: deployment
65-
uses: actions/deploy-pages@v4
84+
- name: Push updates
85+
run: git push origin gh-pages --force

0 commit comments

Comments
 (0)