Skip to content

Commit 34cd4d1

Browse files
Initial commit: Automated Element Web sync with icon path renaming
This repository automatically syncs Element Web releases and renames icon paths to avoid conflicts with Apache's mod_alias icon directory. Features: - Automated workflow runs every Monday and Thursday at 03:00 UTC - Fetches latest Element Web releases from element-hq/element-web - Renames 'icons/' directory to 'ui-icons/' to prevent Apache conflicts - Updates all CSS and HTML references accordingly - Creates GitHub issues for new releases - Tracks processed versions to avoid duplicate work
1 parent abc9ad6 commit 34cd4d1

847 files changed

Lines changed: 146337 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Sync Element Web
2+
3+
on:
4+
schedule:
5+
- cron: "0 3 * * 1,4" # every Monday and Thursday at 03:00 UTC
6+
workflow_dispatch:
7+
8+
jobs:
9+
sync:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repo
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
persist-credentials: true
17+
18+
- name: Get latest release info
19+
id: release
20+
run: |
21+
LATEST=$(curl -s https://api.github.com/repos/element-hq/element-web/releases/latest | jq -r '.tag_name')
22+
echo "tag=$LATEST" >> $GITHUB_OUTPUT
23+
echo "Latest release: $LATEST"
24+
25+
# Check if this version is already processed
26+
if [ -f "current-release.txt" ]; then
27+
CURRENT=$(cat current-release.txt)
28+
if [ "$CURRENT" == "$LATEST" ]; then
29+
echo "skip=true" >> $GITHUB_OUTPUT
30+
echo "Release $LATEST already processed, skipping..."
31+
else
32+
echo "skip=false" >> $GITHUB_OUTPUT
33+
echo "New release detected: $CURRENT -> $LATEST"
34+
fi
35+
else
36+
echo "skip=false" >> $GITHUB_OUTPUT
37+
echo "No current-release.txt found, processing $LATEST"
38+
fi
39+
40+
- name: Download release tarball
41+
if: steps.release.outputs.skip != 'true'
42+
run: |
43+
curl -L https://github.com/element-hq/element-web/releases/download/${{ steps.release.outputs.tag }}/element-${{ steps.release.outputs.tag }}.tar.gz \
44+
-o element-web.tar.gz
45+
tar -xzf element-web.tar.gz
46+
mv element-${{ steps.release.outputs.tag }} upstream-release
47+
48+
- name: Run rename/move script
49+
if: steps.release.outputs.skip != 'true'
50+
run: |
51+
chmod +x ./scripts/rename.sh
52+
mkdir -p ./processed
53+
./scripts/rename.sh ./upstream-release ./processed
54+
55+
- name: Commit and push
56+
if: steps.release.outputs.skip != 'true'
57+
run: |
58+
git config user.name "github-actions"
59+
git config user.email "actions@github.com"
60+
61+
# Clean up temporary files
62+
rm -rf upstream-release element-web.tar.gz
63+
64+
# Save the current release version
65+
echo "${{ steps.release.outputs.tag }}" > current-release.txt
66+
67+
# Only commit if there are changes
68+
if [ -n "$(git status --porcelain)" ]; then
69+
git add processed/
70+
[ -f current-release.txt ] && git add current-release.txt
71+
git commit -m "Update to ${{ steps.release.outputs.tag }}"
72+
git push origin main
73+
else
74+
echo "No changes to commit"
75+
fi
76+
77+
- name: Prepare changelog for issue
78+
if: steps.release.outputs.skip != 'true'
79+
run: |
80+
# Fetch release notes from GitHub API
81+
curl -s https://api.github.com/repos/element-hq/element-web/releases/tags/${{ steps.release.outputs.tag }} \
82+
| jq -r '.body' > ./changelog-excerpt.md
83+
echo "Release notes fetched from GitHub"
84+
85+
- name: Notify via GitHub issue
86+
if: steps.release.outputs.skip != 'true'
87+
uses: peter-evans/create-issue-from-file@v5
88+
with:
89+
title: "New Element Web release ${{ steps.release.outputs.tag }}"
90+
content-filepath: ./changelog-excerpt.md
91+
token: ${{ secrets.GITHUB_TOKEN }}
92+

README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"applinks": {
3+
"details": [
4+
{
5+
"appIDs": [
6+
"7J4U792NQT.im.vector.app",
7+
"7J4U792NQT.io.element.elementx",
8+
"7J4U792NQT.io.element.elementx.nightly"
9+
],
10+
"components": [
11+
{
12+
"?": {
13+
"no_universal_links": "?*"
14+
},
15+
"exclude": true,
16+
"comment": "Opt out of universal links"
17+
},
18+
{
19+
"/": "/*",
20+
"comment": "Matches any URL"
21+
}
22+
]
23+
}
24+
]
25+
},
26+
"webcredentials": {
27+
"apps": [
28+
"7J4U792NQT.im.vector.app",
29+
"7J4U792NQT.io.element.elementx",
30+
"7J4U792NQT.io.element.elementx.nightly"
31+
]
32+
}
33+
}

processed/bundles/7c26c7d29cfa110f02e3/1095.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

processed/bundles/7c26c7d29cfa110f02e3/1095.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

processed/bundles/7c26c7d29cfa110f02e3/1127.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

processed/bundles/7c26c7d29cfa110f02e3/1127.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

processed/bundles/7c26c7d29cfa110f02e3/1188.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

processed/bundles/7c26c7d29cfa110f02e3/1188.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

processed/bundles/7c26c7d29cfa110f02e3/1526.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)