forked from element-hq/element-web
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
1,835 additions
and
2,259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Dockerhub | ||
on: | ||
workflow_dispatch: { } | ||
push: | ||
tags: [ v* ] | ||
schedule: | ||
# This job can take a while, and we have usage limits, so just publish develop only twice a day | ||
- cron: '0 7/12 * * *' | ||
concurrency: ${{ github.ref_name }} | ||
jobs: | ||
buildx: | ||
name: Docker Buildx | ||
runs-on: ubuntu-latest | ||
environment: dockerhub | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # needed for docker-package to be able to calculate the version | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
install: true | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: | | ||
vectorim/element-web | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- name: Update repo description | ||
uses: peter-evans/dockerhub-description@v2 | ||
continue-on-error: true | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
repository: vectorim/element-web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,14 +44,7 @@ jobs: | |
name: P1 X-Needs-Design to Design project board | ||
runs-on: ubuntu-latest | ||
if: > | ||
contains(github.event.issue.labels.*.name, 'X-Needs-Design') && | ||
(contains(github.event.issue.labels.*.name, 'S-Critical') && | ||
(contains(github.event.issue.labels.*.name, 'O-Frequent') || | ||
contains(github.event.issue.labels.*.name, 'O-Occasional')) || | ||
contains(github.event.issue.labels.*.name, 'S-Major') && | ||
contains(github.event.issue.labels.*.name, 'O-Frequent') || | ||
contains(github.event.issue.labels.*.name, 'A11y') && | ||
contains(github.event.issue.labels.*.name, 'O-Frequent')) | ||
contains(github.event.issue.labels.*.name, 'X-Needs-Design') | ||
steps: | ||
- uses: octokit/[email protected] | ||
id: add_to_project | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,3 @@ | ||
// Copied from react-sdk | ||
// TODO: Only keep one copy of this for synchronization purposes | ||
module.exports = { | ||
"extends": "stylelint-config-standard", | ||
"plugins": [ | ||
"stylelint-scss", | ||
], | ||
"rules": { | ||
"indentation": 4, | ||
"comment-empty-line-before": null, | ||
"declaration-empty-line-before": null, | ||
"length-zero-no-unit": null, | ||
"rule-empty-line-before": null, | ||
"color-hex-length": null, | ||
"max-empty-lines": null, | ||
"number-no-trailing-zeros": null, | ||
"number-leading-zero": null, | ||
"selector-list-comma-newline-after": null, | ||
"at-rule-no-unknown": null, | ||
"no-descending-specificity": null, | ||
"scss/at-rule-no-unknown": [true, { | ||
// https://github.com/vector-im/element-web/issues/10544 | ||
"ignoreAtRules": ["define-mixin"], | ||
}], | ||
} | ||
...require("matrix-react-sdk/.stylelintrc.js"), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env node | ||
'use strict'; | ||
|
||
const fs = require("fs"); | ||
const { exec } = require("node:child_process"); | ||
|
||
const includeJSSDK = process.argv.includes("--include-js-sdk"); | ||
const ignore = []; | ||
|
||
ignore.push(...Object.values(JSON.parse(fs.readFileSync(`${__dirname}/../components.json`)))); | ||
ignore.push("/index.ts"); | ||
// We ignore js-sdk by default as it may export for other non element-web projects | ||
if (!includeJSSDK) ignore.push("matrix-js-sdk"); | ||
|
||
const command = `yarn ts-prune --ignore "${ignore.join("|")}" | grep -v "(used in module)"`; | ||
|
||
exec(command, (error, stdout, stderr) => { | ||
if (error) throw error; | ||
// We have to do this as piping the output of ts-prune causes the return | ||
// code to be 0 | ||
if (stderr) throw Error(stderr); | ||
|
||
let lines = stdout.split("\n"); | ||
// Remove the first line as that is the command that was being run and we | ||
// log that only in case of an error | ||
lines.splice(0, 1); | ||
// Remove the last line as it is empty | ||
lines.pop(); | ||
|
||
// ts-prune has bug where if the unused export is in a dependency, the path | ||
// won't have an "/" character at the start, so we try to fix that for | ||
// better UX | ||
// TODO: This might break on Windows | ||
lines = lines.reduce((newLines, line) => { | ||
if (!line.startsWith("/")) newLines.push("/" + line); | ||
else newLines.push(line); | ||
return newLines; | ||
}, []); | ||
|
||
// If an unused export has been found, we error | ||
if (lines.length > 0) { | ||
console.log(`Command that was run: ${command}`); | ||
console.log(lines.join("\n")); | ||
throw Error("Unused exports found!"); | ||
} | ||
|
||
console.log("Success - no unused exports found!"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.