Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to 2.5.4 #28

Closed
wants to merge 201 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
201 commits
Select commit Hold shift + click to select a range
2453b2a
set lang attr on <html> according to user's choice
binotaliu Apr 10, 2020
bdd2de7
set default lang attr for note to 'en'
binotaliu Apr 10, 2020
9b899c7
escape attribute value for lang
binotaliu Apr 10, 2020
3df0903
Convert "include" directives to functions
Aug 22, 2020
0aff524
Make permission labels translatable.
Sep 1, 2020
66fdf7b
Make permission and status translatable
Sep 1, 2020
dec2f98
Make "Expand all" translatable
Sep 3, 2020
ffac645
Remove the semicolons
Sep 11, 2020
ac43db8
Fix matchInContainer false positives
tamo Sep 25, 2020
0ec949d
Add oauth2 authorization
Nov 20, 2020
4002306
Update public/js/index.js
tamo May 12, 2021
ad1bfa6
Update public/js/index.js
tamo May 12, 2021
9343d32
Merge branch 'patch-1' of https://github.com/tamo/codimd into patch-1
May 13, 2021
5e70965
fix: handle when request url has no valid referer
jackycute May 13, 2021
db5fc50
fix: avoid append zero suffix on exporting user data
jackycute May 13, 2021
3af5408
Merge pull request #1680 from hackmdio/bugfix/fix-export-user-data-fi…
a60814billy May 13, 2021
54f6e55
Merge pull request #1679 from hackmdio/bugfix/fix-no-referrer-for-ret…
a60814billy May 13, 2021
a41c4db
fix: S3 client config passing for image upload
jackycute May 13, 2021
e9293b0
feat: add TeX mhchem extensions for MathJax
jackycute May 13, 2021
a913c61
feat: bump package-lock codimd version
jackycute May 18, 2021
b6837f1
feat: upgrade flowchart.js to version 1.15.0
jackycute May 18, 2021
599fd41
Merge pull request #1683 from hackmdio/bugfix/fix-image-upload-s3-config
a60814billy May 19, 2021
b27f147
Merge pull request #1684 from hackmdio/feature/support-mhchem-mathjax
a60814billy May 25, 2021
8c20d9f
Merge pull request #1685 from hackmdio/feature/upgrade-flowchart.js-1…
a60814billy May 25, 2021
2338113
chore: add dev container
a60814billy May 25, 2021
34f502c
Add test and build actions
Yukaii Jun 10, 2021
71dce28
Add doctoc check
Yukaii Jun 10, 2021
2432397
Fix doctoc workflow
Yukaii Jun 10, 2021
dcfdb01
Remove travis CI config
Yukaii Jun 10, 2021
b6d5db3
fix: should not clear guest history when guest pin note
a60814billy Jun 12, 2021
282fcab
Merge pull request #1694 from hackmdio/chore/github-actions
a60814billy Jun 16, 2021
0280a2e
feat: implement CSRF token in export user data
a60814billy Jun 11, 2021
b8203ae
fix: profile dropdown should not set active class
a60814billy Jun 11, 2021
6966881
fix: strip html tags for gist id to avoid stored XSS on showing error…
jackycute Jun 2, 2021
2eefe77
fix: strip html tags for gist file, gist line, gist highlight line, g…
jackycute Jun 9, 2021
e75e28c
feat: upgrade mermaid to version 8.10.1
jackycute May 31, 2021
16a1e82
feat: upgrade mermaid to version 8.10.2
jackycute Jun 16, 2021
82b7800
Merge pull request #1691 from hackmdio/bugfix/fix-gist-id-stored-XSS
a60814billy Jun 16, 2021
e623b72
Merge pull request #1690 from hackmdio/feature/upgrade-mermaid-8.10.1
a60814billy Jun 16, 2021
1bdedf1
Merge pull request #1688 from hackmdio/chore/dev-container
jackycute Jun 16, 2021
9c280b0
Add support for arm64 build
YadominJinta Jul 5, 2021
6b8950d
Merge pull request #1481 from ghost/lang-attr
jackycute Jul 9, 2021
4b78202
Merge pull request #1605 from tamo/patch-1
jackycute Jul 9, 2021
620197f
Merge pull request #1580 from tamo/master
a60814billy Jul 9, 2021
e7a5ea8
Merge pull request #1587 from tamo/more-i18n
a60814billy Jul 9, 2021
3b1e270
Merge pull request #1701 from YadominJinta/develop
a60814billy Jul 9, 2021
b2e2743
fix: may referernce out of bound index in clearDuplicatedHistory
a60814billy Jul 31, 2021
0d1cd1d
feat: add organizations whitelist to GitHub OAuth
jakubgs Aug 20, 2021
80fc6bc
chore: upgrade codemirror to 5.61.3
Yukaii Sep 27, 2021
d627d9f
Documentation - add Music section and move abc abd fretboard to this …
brunetton Sep 15, 2021
5db11d2
Merge pull request #1706 from hackmdio/fix/incorrect-array-index-refe…
Yukaii Oct 15, 2021
e45194e
Merge pull request #1695 from hackmdio/feat/csrf-export-user-data
Yukaii Oct 15, 2021
c013c22
chore: bump meta-marked to 0.5.0
Yukaii Oct 19, 2021
e1ea214
chore: remove unused uglifyjs-webpack-plugin dep
Yukaii Oct 19, 2021
08592f8
feat: deprecate sequelize.import usage
Yukaii Oct 19, 2021
5b564c6
Merge pull request #1724 from hackmdio/refactor/sequelize-import
Yukaii Oct 22, 2021
bfda919
chore: upgrade codemirror to 5.63.2
Yukaii Oct 22, 2021
32f3246
Merge pull request #1716 from hackmdio/chore/upgrade-codemirror
Yukaii Oct 25, 2021
ded6b58
Merge pull request #1723 from hackmdio/chore/remove-uglifyjs
Yukaii Oct 25, 2021
54e5b93
Update README.md to remove IE from supporting list
jackycute Oct 31, 2021
adb0dd5
Fix fence class array initialization
V1ncNet Jan 5, 2022
212d8b3
Update de.json
Jan 16, 2022
be3b2a9
Merge pull request #1741 from rubstudent/develop
a60814billy Jan 18, 2022
ce1b1cc
doc(release-note): Releaes 2.4.1
a60814billy Jan 18, 2022
07cfb29
🐛 [fix] modify replacement rule for disqus short-name
chenxuanzzy Mar 3, 2022
1a38aaa
s3 support multiple cloud providers: https://github.com/hackmdio/codi…
blademainer May 6, 2022
7b1e4e3
s3 support multiple cloud providers: https://github.com/hackmdio/codi…
blademainer May 6, 2022
e6d2b7a
Upgrade Node.js version
inductor Aug 2, 2022
b55bf97
doc(release-note): change release version to 2.4.2
a60814billy Aug 6, 2022
5d84066
Merge pull request #1742 from hackmdio/develop
a60814billy Aug 6, 2022
03f8649
upgrading pg to 8.8.0 to support new scram-sha-256 authentication
phntom Dec 4, 2022
5d72fae
fix: restrict export type and use sandbox to prevent potential attack
galaxian85 Jan 6, 2023
9df1c34
fix: sanitize vimeo video id to prevent XSS
galaxian85 Jan 10, 2023
a7564e7
Merge pull request #1697 from hackmdio/fix/guest-history-pin
jackycute Jan 13, 2023
3ab0b7e
Merge pull request #1762 from blademainer/develop
jackycute Jan 13, 2023
21345ed
Merge pull request #1715 from brunetton/develop
jackycute Jan 13, 2023
a2565bd
Merge pull request #1739 from V1ncNet/hotfix/fence-class
jackycute Jan 13, 2023
8b29d05
Merge pull request #1729 from hackmdio/feature/readme-remove-IE-support
a60814billy Jan 13, 2023
8efc2d0
chore: update formidable to 2.1.1
galaxian85 Jan 7, 2023
1ab2a36
fix: handle error when check is image valid
galaxian85 Jan 7, 2023
30fe18d
Merge pull request #1792 from galaxian85/bugfix/potential-xss-vulnera…
jackycute Jan 13, 2023
19f494d
Merge pull request #1789 from galaxian85/bugfix/invalid-filename-caus…
a60814billy Jan 13, 2023
6a5da1e
Typos + Better translation for "Externals"
eyssette Jan 15, 2023
3a3e892
Merge pull request #1722 from hackmdio/chore/upgrade-meta-marked-to-0…
jackycute Jan 28, 2023
c78bb69
Merge pull request #1793 from eyssette/patch-2
jackycute Jan 28, 2023
ee47c6c
fix(buildpacks): replace custom buildpack with APT buildpack
EtienneM Feb 14, 2023
6ff5a3a
feat: Migrate to gtag and support GA4
assanges Feb 26, 2023
3ea10a6
Update minimum required node.js version to v12
PeterDaveHello Mar 1, 2023
500fe78
Update npm package dependencies
PeterDaveHello Mar 1, 2023
342ff2b
Merge pull request #1797 from EtienneM/develop
jackycute Mar 9, 2023
b09a472
Merge pull request #1790 from galaxian85/bugfix/pandoc-security-issue
jackycute Mar 9, 2023
52bfb9b
Merge pull request #1799 from PeterDaveHello/updateDependenciesBaseline
Yukaii Mar 9, 2023
08e2dcd
Merge pull request #1798 from assanges/feature/support-ga4
jackycute Mar 17, 2023
4399457
reword japanese
AQ-masatoshi-yamaguchi Mar 23, 2023
75d830d
Merge pull request #1802 from AQ-masatoshi-yamaguchi/reword-japanese
jackycute Mar 23, 2023
20e71a3
fix: use encoded note id to update history
bbtfr Apr 10, 2023
298db32
Merge pull request #1804 from bbtfr/fix-note-id
jackycute Jun 5, 2023
8af3638
Merge pull request #1784 from phntom/develop
jackycute Jun 5, 2023
a3a789b
Merge pull request #1710 from status-im/gh-oauth-orgs
jackycute Jun 5, 2023
f1ed885
Merge branch 'develop' into update_node
jackycute Jun 5, 2023
ae38fd3
Merge pull request #1767 from inductor/update_node
jackycute Jun 5, 2023
be1f4cf
Merge pull request #1626 from joachimmathes/oauth2_authorization
jackycute Jun 5, 2023
289db3d
Merge pull request #1750 from chenxuanzzy/bugfix/fix-regex
jackycute Jun 5, 2023
09e7dfe
feat: update package-lock.json
jackycute Jun 5, 2023
03e456f
Revert "feat: update package-lock.json"
jackycute Jun 5, 2023
e2ecaa8
feat: update package-lock.json
jackycute Jun 5, 2023
dd4c236
feat: update package-lock.json
jackycute Jun 5, 2023
5ce1537
fix: js standard code styles
jackycute Jun 5, 2023
c97e224
fix: jsonlint code styles
jackycute Jun 5, 2023
b5b95df
fix: hide exportNoteData form in history page nav
jackycute Jun 5, 2023
c4f607f
Merge pull request #1808 from hackmdio/bugfix/fix-history-nav-ui
jackycute Jun 5, 2023
b6078a6
Update both Traditional and Simplified Chinese locales
PeterDaveHello Jun 18, 2023
192698b
Update npm dependencies with `npm audit fix`, except `markmap-lib`
PeterDaveHello Jun 18, 2023
976bca3
Update npm dependency markmap-lib to ^0.9.3
PeterDaveHello Jun 18, 2023
3f7d202
Update npm dependencies with `npm audit fix` after markmap-lib update
PeterDaveHello Jun 18, 2023
8efa75e
Update node.js version in .nvmrc
PeterDaveHello Jun 18, 2023
b6eba05
Merge pull request #1816 from PeterDaveHello/node.js-14
jackycute Aug 11, 2023
11cd200
fix: sanitize pdf url to prevent xss
EastSun5566 Dec 15, 2023
2a977bc
fix: markmap api changes in 0.9.3
Yukaii Dec 26, 2023
6d95fd1
Merge pull request #1817 from PeterDaveHello/updateDependenciesBaseline
Yukaii Dec 26, 2023
dca7f8c
Merge pull request #1832 from hackmdio/bugfix/sanitize-url-to-prevent…
Yukaii Dec 26, 2023
070808b
Merge pull request #1815 from PeterDaveHello/updateLocales
Yukaii Dec 26, 2023
027a4b4
fix the uploadimage form
hcyuser Aug 9, 2023
96a589d
add newline here to pass the standard lint.
hcyuser Aug 10, 2023
1b1ff89
fix: formidable option API changes
Yukaii Dec 26, 2023
f58c669
Merge pull request #1836 from hackmdio/bugfix/uploadimage-form
stanley2058 Dec 26, 2023
c436af1
fix: logout api should add callback
Yukaii Dec 26, 2023
9790586
Merge pull request #1837 from hackmdio/bugfix/logout-callback
stanley2058 Dec 26, 2023
f8b0301
doc(release-note): release 2.5.0
stanley2058 Dec 26, 2023
9b8a2de
Merge branch 'master' into release/2.5.0
stanley2058 Dec 26, 2023
86bf44f
doc(release-note): update release code name
stanley2058 Dec 26, 2023
afe49f4
doc(release-note): update release note
stanley2058 Dec 26, 2023
78e6663
Merge pull request #1835 from hackmdio/release/2.5.0
jackycute Dec 26, 2023
1b2f97a
fix: dependency resolving with prom-client v12
Yukaii Dec 26, 2023
97eb1f2
fix: http authentication for git
Yukaii Dec 26, 2023
7257ac6
Merge pull request #1834 from hackmdio/bugfix/fix-dependency-conflict…
Yukaii Jan 2, 2024
a3ccd1a
Merge branch 'master' into develop
Yukaii Jan 2, 2024
4a7c54a
chore: bump pandocjs version
EastSun5566 Jan 3, 2024
3b8b9e7
Merge pull request #1843 from hackmdio/chore/bump-pandocjs-version
Yukaii Jan 3, 2024
31fd655
chore: replace mattermost-redux with mattermost/client
Yukaii Jan 2, 2024
5508a93
Merge pull request #1840 from hackmdio/bugfix/dev-655-replace-matterm…
Yukaii Jan 3, 2024
78c5193
chore: @hackmd/pandoc.js to 0.2.1
Yukaii Jan 3, 2024
03cd0c3
Merge pull request #1845 from hackmdio/bugfix/pandoc-2-1-0
Yukaii Jan 3, 2024
59fa411
docs: update release note for 2.5.1
Yukaii Jan 3, 2024
b0d1999
chore: bump package version to 2.5.1
Yukaii Jan 3, 2024
d6ac65e
Merge pull request #1844 from hackmdio/release/2.5.1
Yukaii Jan 3, 2024
cc78023
Merge branch 'master' into develop
Yukaii Jan 3, 2024
0f4b988
chore: bump @hackmd/pandoc to 0.3.4
Yukaii Jan 4, 2024
cd52cb7
fix: only allow string type exportType paramter
Yukaii Jan 4, 2024
dd5bdcd
chore: remove cjk image build
Yukaii Jan 4, 2024
9eaec01
chore: push-image workflow
Yukaii Jan 4, 2024
9846143
Merge pull request #1847 from hackmdio/chore/bump-pandoc-js
Yukaii Jan 4, 2024
72aca4e
Merge pull request #1848 from hackmdio/chore/build-image-with-github-…
Yukaii Jan 4, 2024
82fe56c
fix: tags should be multiline
Yukaii Jan 4, 2024
c282a3d
chore: remove sha tag prefix
Yukaii Jan 4, 2024
fa0d7e8
fix: push by labels in matrix stage
Yukaii Jan 4, 2024
a68054f
chore: enable arm64 build
Yukaii Jan 4, 2024
5ce5e2a
fix: update buildpack/runtime tag to 16.20.2-35fe7e39
Yukaii Jan 5, 2024
4521f6e
Merge pull request #1849 from hackmdio/chore/build-image-cont
Yukaii Jan 5, 2024
d94ac6c
docs: update 2.5.2 release note
Yukaii Jan 5, 2024
b396c4d
Merge pull request #1850 from hackmdio/release/2.5.2
jackycute Jan 5, 2024
b9da191
Merge branch 'master' into develop
Yukaii Jan 6, 2024
3206b11
feat: add codeium meta in head
Yukaii Jan 6, 2024
12d9812
feat: add check-release workflow
Yukaii Jan 6, 2024
3a2a80e
test: add test data for act
Yukaii Jan 7, 2024
deee9ef
Merge pull request #1851 from hackmdio/feature/add-codeium-browser-ex…
Yukaii Jan 8, 2024
802d664
Merge pull request #1852 from hackmdio/chore/add-release-check-github…
Yukaii Jan 8, 2024
8b5066b
chore: bump package.json version to 2.5.3
Yukaii Jan 8, 2024
b97a2bf
docs: update relase note for 2.5.3
Yukaii Jan 8, 2024
80cd92f
Merge pull request #1854 from hackmdio/release/2.5.3
Yukaii Jan 8, 2024
c4bdf48
chore: update docker-compose default image version to 2.5.3
Yukaii Jan 9, 2024
d157fde
Merge branch 'master' into develop
Yukaii Jan 13, 2024
50befee
anchorと関連jsが動いてなかったので修正対応
moonstruckdrops Feb 7, 2024
a96ce5b
Merge pull request #24 from kufu/fix_export
shigerix Mar 6, 2024
1407e16
fix: exclude name attribute from iframe filterXSS allowlist
Yukaii Apr 30, 2024
93cff2f
hackmd の最新を取り込み
shigerix May 31, 2024
1b535ad
package-lockを更新
yoyogix May 31, 2024
b546b52
buildpack と runtaime を最新のものに変更
shigerix May 31, 2024
fabb874
ci のbuildがコケていたので修正
shigerix Jun 4, 2024
cc182a3
不要なカンマとセミコロンを削除
shigerix Jun 4, 2024
9075ad1
Merge pull request #1855 from hackmdio/chore/bump-docker-compose-imag…
Yukaii Jun 5, 2024
64fecd7
typo opened source -> open sourced
biswabaibhab007 Oct 6, 2023
b96ae67
アルファベット順に並び替え
shigerix Jun 5, 2024
d767cc4
Merge pull request #1869 from hackmdio/fix/readme-typo
Yukaii Jun 5, 2024
f8cfe81
Merge pull request #1865 from hackmdio/bugfix/exlucde-name-attribute-…
Yukaii Jun 5, 2024
0701fd7
Add index at revision table
yamashush Jan 14, 2024
0287726
style: lint fix
Yukaii Jun 5, 2024
59a6277
fix: use randomFileName as default start file name to ensure the rand…
Yukaii Jun 5, 2024
5eb3591
Update lib/imageRouter/filesystem.js
Yukaii Jun 5, 2024
a0c82d3
Merge pull request #1867 from hackmdio/refactor/reuse-random-filename
Yukaii Jun 5, 2024
f00df50
Merge pull request #1856 from yamashush/add-index-at-revisions
Yukaii Jun 5, 2024
3285121
chore: update release note for 2.5.4
Yukaii Jun 6, 2024
94ec934
chore: bump package version to 2.5.4
Yukaii Jun 6, 2024
da511d0
Merge pull request #1870 from hackmdio/release/2.5.4
Yukaii Jun 18, 2024
9189c77
dbURLでの指定ではなく、dbオプションで明示的に指定するように変更
yoyogix Jul 18, 2024
f23430c
Merge pull request #25 from shigerix/v2.5.3
yoyogix Jul 19, 2024
e5f2241
Merge remote-tracking branch 'refs/remotes/codimd/master' into v2.5.4
yoyogix Jul 19, 2024
90d44b4
migrationファイル名をmaster-smarthrのものと揃える
yoyogix Jul 19, 2024
edbf589
Merge pull request #26 from yoyogix/v2.5.4
yoyogix Jul 23, 2024
a6a1dc7
本番環境用のapp.yaml を修正
shigerix Jul 25, 2024
7b30e25
Merge pull request #27 from shigerix/staging-smarthr
shigerix Jul 25, 2024
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
2 changes: 1 addition & 1 deletion .buildpacks
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
https://github.com/alex88/heroku-buildpack-vips
https://github.com/Scalingo/apt-buildpack
https://github.com/Scalingo/nodejs-buildpack
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# [Choice] Node.js version: 16, 14
ARG VARIANT=14-buster
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node modules
RUN su node -c "npm install -g npm@6"
58 changes: 58 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "CodiMD",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/zsh",
"sqltools.connections": [{
"name": "Container Database",
"driver": "PostgreSQL",
"previewLimit": 50,
"server": "localhost",
"port": 5432,
"database": "codimd",
"username": "codimd",
"password": "codimd"
}],
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint",
"visualstudioexptteam.vscodeintellicode",
"christian-kohler.path-intellisense",
"standard.vscode-standard",
"mtxr.sqltools",
"mtxr.sqltools-driver-pg",
"eamodio.gitlens",
"codestream.codestream",
"github.vscode-pull-request-github",
"cschleiden.vscode-github-actions",
"hbenl.vscode-mocha-test-adapter",
"hbenl.vscode-test-explorer"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

"portsAttributes": {
"3000": {
"label": "CodiMD server",
"onAutoForward": "notify"
},
"5432": {
"label": "PostgreSQL",
"onAutoForward": "notify"
}
},

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
"postCreateCommand": "sudo chown -R node:node node_modules && /workspace/bin/setup",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}
46 changes: 46 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: '3'

services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
args:
VARIANT: 14-buster
environment:
- CMD_DB_URL=postgres://codimd:codimd@localhost/codimd
- CMD_USECDN=false
volumes:
- ..:/workspace:cached
- node_modules:/workspace/node_modules:cached

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.

# Uncomment the next line to use a non-root user for all processes.
# user: vscode

# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

db:
image: postgres:12.7-alpine
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=codimd
- POSTGRES_PASSWORD=codimd
- POSTGRES_DB=codimd

# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

volumes:
node_modules:
postgres-data:
6 changes: 6 additions & 0 deletions .github/tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Test github actions with act

```bash
act pull_request --container-architecture linux/arm64 -e .github/tests/pull-request.json -j ch
eck-release-pr -P ubuntu-latest=catthehacker/ubuntu:act-latest
```
10 changes: 10 additions & 0 deletions .github/tests/pull-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"pull_request": {
"head": {
"ref": "release/1.2.3"
},
"base": {
"ref": "master"
}
}
}
57 changes: 57 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: 'Test and Build'

on:
push:
pull_request:
workflow_dispatch:

jobs:
test-and-build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]

steps:
- uses: actions/checkout@v2

# from https://stackoverflow.com/a/69649733
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://git@github.com/

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- uses: actions/setup-node@v2
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
check-latest: true

- run: npm ci
- run: npm run test:ci
- run: npm run build

doctoc:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || github.event.pull_request

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
name: Use Node.js 14
with:
node-version: 14
check-latest: true
- name: Install doctoc-check
run: |
npm install -g doctoc
cp README.md README.md.orig
npm run doctoc
diff -q README.md README.md.orig
41 changes: 41 additions & 0 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release PR Checks

on:
workflow_dispatch:
pull_request:
branches:
- master

jobs:
check-release-pr:
if: startsWith(github.head_ref, 'release/')
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Check for release-notes updates
run: |
if ! git diff --exit-code origin/develop -- public/docs/release-notes.md; then
echo "Release notes updated."
else
echo "Error: Release notes not updated in the PR."
exit 1
fi

- name: Compare package.json version with master
run: |
git fetch origin master
MASTER_PACKAGE_VERSION=$(git show origin/master:package.json | jq -r '.version')
BRANCH_PACKAGE_VERSION=$(jq -r '.version' package.json)

if [ "$BRANCH_PACKAGE_VERSION" != "$MASTER_PACKAGE_VERSION" ]; then
echo "Version bumped in package.json."
else
echo "Error: Version in package.json has not been bumped."
exit 1
fi

123 changes: 123 additions & 0 deletions .github/workflows/push-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Build and push image

on:
release:
types: [published]
workflow_dispatch:
inputs:
runtime:
description: 'Runtime image'
required: true
default: 'hackmdio/runtime:16.20.2-35fe7e39'
buildpack:
description: 'Buildpack image'
required: true
default: 'hackmdio/buildpack:16.20.2-35fe7e39'

env:
REGISTRY_IMAGE: hackmdio/hackmd

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
-
name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push by digest
id: build
uses: docker/build-push-action@v5
with:
context: .
file: ./deployments/Dockerfile
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
build-args: |
RUNTIME=${{ github.event.inputs.runtime || 'hackmdio/runtime:16.20.2-35fe7e39' }}
BUILDPACK=${{ github.event.inputs.buildpack || 'hackmdio/buildpack:16.20.2-35fe7e39' }}
-
name: Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
-
name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ env.PLATFORM_PAIR }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1

merge:
runs-on: ubuntu-latest
needs:
- build
steps:
-
name: Download digests
uses: actions/download-artifact@v4
with:
path: /tmp/digests
pattern: digests-*
merge-multiple: true
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=match,pattern=\d.\d.\d
type=sha,prefix=
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
-
name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10.20.1
v16.20.2
1 change: 1 addition & 0 deletions Aptfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libvips-dev
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ HackMD is built with one promise - **You own and control all your content**:

## CodiMD - The Open Source HackMD

CodiMD is the free software version of [HackMD](https://hackmd.io), developed and opened source by the HackMD team with reduced features (without book mode), you can use CodiMD for your community and own all your data. *(See the [origin of the name CodiMD](https://github.com/hackmdio/hackmd/issues/720).)*
CodiMD is the free software version of [HackMD](https://hackmd.io), developed and open sourced by the HackMD team with reduced features (without book mode), you can use CodiMD for your community and own all your data. *(See the [origin of the name CodiMD](https://github.com/hackmdio/hackmd/issues/720).)*

CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases.

Expand Down Expand Up @@ -81,7 +81,7 @@ CodiMD is a service that runs on Node.js, while users use the service through br
- <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" /> Chrome >= 47, Chrome for Android >= 47
- <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" /> Safari >= 9, iOS Safari >= 8.4
- <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" /> Firefox >= 44
- <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" /> IE >= 9, Edge >= 12
- <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" /> Edge >= 12
- <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" /> Opera >= 34, Opera Mini not supported
- Android Browser >= 4.4

Expand Down
Loading
Loading