Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 56 additions & 1 deletion .github/workflows/deploy-main-branches.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Build » Deploy main branches

# NOTE: This should *not* run on tags, these are handled in the main repo
on:
push:
branches:
Expand Down Expand Up @@ -33,6 +34,7 @@ jobs:
#Strip the r/ prefix, giving us just 17.x. If this is main/develop this does nothing
echo "branch=${TEMP#r\/}" >> $GITHUB_OUTPUT


deploy-main-branches:
runs-on: ubuntu-latest
needs: detect-repo-owner
Expand Down Expand Up @@ -91,6 +93,59 @@ jobs:
git add assets
git diff --staged --quiet || git commit --amend -m "Build $(date)"


- name: Push updates
run: git push origin gh-pages --force


file-upstream-admin-pr:
name: Create upstream admin PR to incorporate build
runs-on: ubuntu-latest
needs: detect-repo-owner
permissions:
contents: write # For the release
pull-requests: write # For the PR in the upstream repo

steps:
- name: Prepare git
run: |
git config --global user.name "Admin Interface Commit Bot"
git config --global user.email "cloud@opencast.org"

- name: Prepare GitHub SSH key
env:
DEPLOY_KEY: ${{ secrets.MODULE_PR_DEPLOY_KEY }}
run: |
install -dm 700 ~/.ssh/
echo "${DEPLOY_KEY}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts

- name: Clone upstream repository
run: |
git clone -b ${{ github.ref_name }} "git@github.com:${{ github.repository_owner }}/opencast.git" opencast
cd opencast
git checkout -b t/admin-$GITHUB_REF

- name: Update the admin submodule
working-directory: opencast
run: |
# Note: This could be a race condition in that rapid submodule pushes can trigger multiple PRs in short order
# and we don't have a guarantee that the update triggered by commit A does not end up finding commit B
# We are going to ignore this possibility since we almost universally want the *latest* commit, though this
# could end up causing the commit message, and the actual submodule hash to differ.
git submodule update --init --remote modules/admin-ui
git add modules/admin-ui
git commit -m "Updating admin-service to $GITHUB_REF"
git push origin t/admin-$GITHUB_REF
# This token is an account wide token which allows creation of PRs and pushes.
echo "${{ secrets.MODULE_PR_TOKEN }}" > token.txt
gh auth login --with-token < token.txt
gh pr create \
--title "Update ${{ needs.detect-repo-owner.outputs.branch }} Admin Interface to $GITHUB_REF" \
--body "Updating Opencast ${{ needs.detect-repo-owner.outputs.branch }} Admin Interface module to [$GITHUB_REF](https://github.com/${{ github.repository_owner }}/admin-interface/commit/$GITHUB_REF)" \
--head=${{ github.repository_owner }}:t/admin-$GITHUB_REF \
--base ${{ github.ref_name }} \
-R ${{ github.repository_owner }}/opencast
#FIXME: fine grained PATs can't apply labels
#FIXME: classic PATs don't have the permissions because the PR isn't in an opencastproject (the user) repo
#--label admin-ui --label maintenance \
6 changes: 3 additions & 3 deletions .github/workflows/pr-deploy-test-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:

- name: Clone repository
run: |
git clone -b gh-pages "git@github.com:${{ github.repository_owner }}/opencast-admin-interface-test.git" admin-interface-test
git clone -b gh-pages "git@github.com:${{ github.repository_owner }}/-admin-interface-test.git" admin-interface-test

- name: Store build in the clone
env:
Expand All @@ -103,8 +103,8 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
wget https://raw.githubusercontent.com/${{ github.repository_owner }}/opencast-admin-interface-test/main/.github/scripts/cleanup-deployments.sh
bash cleanup-deployments.sh ${{ github.repository_owner }}/opencast-admin-interface
wget https://raw.githubusercontent.com/${{ github.repository_owner }}/admin-interface-test/main/.github/scripts/cleanup-deployments.sh
bash cleanup-deployments.sh ${{ github.repository_owner }}/admin-interface
rm -f cleanup-deployments.sh
git add .

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-remove-test-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Clone test repository
run: |
git clone -b gh-pages "git@github.com:opencast/opencast-admin-interface-test.git" admin-interface-test
git clone -b gh-pages "git@github.com:opencast/admin-interface-test.git" admin-interface-test
- name: Delete build if present
working-directory: admin-interface-test
Expand Down
132 changes: 0 additions & 132 deletions .github/workflows/release-build.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/release-cut-tag.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules
/build
.idea/
/target
66 changes: 18 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Development and testing
To get a local copy of the admin UI to test or develop on, you can do the following:

```sh
git clone git@github.com:opencast/opencast-admin-interface.git opencast-admin-interface-demo
cd opencast-admin-interface-demo
git clone git@github.com:opencast/admin-interface.git admin-interface-demo
cd admin-interface-demo
git switch my-branch # or otherwise check out, pull, merge, etc. whatever branch you want to test/hack on
npm ci
```
Expand Down Expand Up @@ -57,58 +57,17 @@ NODE_ENV=development VITE_TEST_SERVER_URL="https://develop.opencast.org" VITE_TE
```


How to cut a release for Opencast via the Github UI
---------------------------------------------------
Admin releases
--------------

1. (Optional) Run the GitHub Actions workflow [Crowdin » Download translations
](https://github.com/opencast/opencast-admin-interface/actions/workflows/crowdin-download-translations.yml)
to ensure all changes from Crowdin are included in the new release.

2. Use the [Release » Create release tag](https://github.com/opencast/opencast-admin-interface/actions/workflows/release-cut-tag.yml)
workflow to create a correctly named tag in the appropriate branch. When running the workflow via the dropdown
ensure you select the correct branch for the release!

3. Wait for the [Release » Process release tag](https://github.com/opencast/opencast-admin-interface/actions/workflows/release-build.yml)
workflow to finish
- It will create a new [GitHub release](https://github.com/opencast/opencast-admin-interface/releases)
- Review the release and make sure the notes are right, update them if not.
- By selecting the previous release, Github can generate release notes automatically
- This review isn't required to happen prior to the next step!

5. Merge the upstream issue that the workflow above filed in [Opencast's main repository](https://github.com/opencast/opencast)


How to cut a release for Opencast manually with git
---------------------------------------------------

1. (Optional) Run the GitHub Actions workflow [Crowdin » Download translations
](https://github.com/opencast/opencast-admin-interface/actions/workflows/crowdin-download-translations.yml)
to ensure all changes from Crowdin are included in the new release.

2. Switch to the commit you want to turn into the release - make sure this is the on `develop` or an `r/N.x` branch

3. Create and push a new tag
```bash
BRANCH=N.x (make sure the version you write here matches the branch you have checked out)
DATE=$(date +%Y-%m-%d)
git tag -sm "Release $BRANCH-$DATE" -s "$BRANCH-$DATE"
git push upstream "$BRANCH-$DATE":"$BRANCH-$DATE"
```

4. Wait for the [Release » Process release tag](https://github.com/opencast/opencast-admin-interface/actions/workflows/release-build.yml)
workflow to finish
- It will create a new [GitHub release](https://github.com/opencast/opencast-admin-interface/releases)
- Review the release and make sure the notes are right, update them if not.
- By selecting the previous release, Github can generate release notes automatically
- This review isn't required to happen prior to the next step!

5. Merge the upstream issue that the workflow above filed in [Opencast's main repository](https://github.com/opencast/opencast)
The admin module no longer cuts releases itself. Opencast's release manager will create tags as appropriate and push
as part of the release process.


Translating the Admin Interface
-------------------------------

You can help translate the Opencast Admin UI to your language on [crowdin.com/project/opencast-admin-interface](https://crowdin.com/project/opencast-admin-interface). Simply request to join the project on Crowdin and start translating. If you are interested in translating a language that is not a target language right now, please create [a GitHub issue](https://github.com/opencast/opencast-admin-interface/issues) and we will add the language.
You can help translate the Opencast Admin UI to your language on [crowdin.com/project/opencast-admin-interface](https://crowdin.com/project/opencast-admin-interface). Simply request to join the project on Crowdin and start translating. If you are interested in translating a language that is not a target language right now, please create [a GitHub issue](https://github.com/opencast/admin-interface/issues) and we will add the language.

This project follows the general form of [Opencast's Localization Process](https://docs.opencast.org/develop/developer/#participate/localization/), especially regarding what happens when you need to [change an existing translation key](https://docs.opencast.org/develop/developer/#participate/localization/#i-need-to-update-the-wording-of-the-source-translation-what-happens). Any questions not answered there should be referred to the mailing lists!

Expand All @@ -119,3 +78,14 @@ Configuration
The Admin UI frontend cannot be directly configured. Rather, it adapts to the
various configurations in the Opencast backend. Fore more information, take a look
at [Opencast's documentation](https://docs.opencast.org).


Admin Repo History
------------------

As part of https://github.com/orgs/opencast/discussions/7277 we decided to rewrite the entire history of this
repository. This was done because it contained the *entire* history of Opencast into the Opencast 14 era. All
repository history prior to the addition of this commit should be considered rewritten history, however there should
be no function changes. The previous tags have been rewritten, but the releases in this GitHub repository have not.
This means that the hash attached to a given release prior to 2026-03-26 will *not* match, however the source will
aside from the changes we made.
Loading
Loading