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

chore: merge reearth/reearth-backend #318

Merged
merged 254 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
254 commits
Select commit Hold shift + click to select a range
72e3edc
fix: auth0 audience in reearth_config.json
rot1024 May 26, 2021
d6c70b1
fix load .env.local
rot1024 May 27, 2021
835a024
fix: auth0 domain and multiple auds
rot1024 May 27, 2021
8196397
chore: set up workflows
rot1024 May 28, 2021
c022a49
chore: fix workflows
rot1024 May 28, 2021
0125aad
chore: print config
rot1024 Jun 1, 2021
37b2c29
refactor: remove unused code
rot1024 Jun 1, 2021
f17b9d0
fix: signing up and deleting user
rot1024 Jun 1, 2021
e9b8c9c
fix: deleting user
rot1024 Jun 1, 2021
e5ab87e
fix: sign up and update user
rot1024 Jun 1, 2021
9b1c4a3
fix: make gql mutation payloads optional
rot1024 Jun 1, 2021
6a27c62
fix: auth0
rot1024 Jun 1, 2021
2d08c50
fix: errors are be overwriten by tx
rot1024 Jun 1, 2021
f531bd0
fix: deleting user
rot1024 Jun 1, 2021
0815d37
fix: always enable dev mode in debug
rot1024 Jun 1, 2021
a5eeaeb
fix: user deletion
rot1024 Jun 2, 2021
72ed8e1
test: pkg/shp (#5)
yk-eukarya Jun 2, 2021
487a737
chore: load .env instead of .env.local
rot1024 Jun 3, 2021
5db065b
feat: Basic auth for projects (#6)
HideBa Jun 3, 2021
9629dd5
chore: add godoc workflow
rot1024 Jun 3, 2021
cc45b53
chore: fix godoc workflow
rot1024 Jun 3, 2021
0db163d
chore: fix godoc workflow
rot1024 Jun 3, 2021
9b78fc2
chore: fix godoc workflow
rot1024 Jun 4, 2021
f1e5a76
chore: fix godoc workflow
rot1024 Jun 4, 2021
f7866c0
chore: fix godoc workflow
rot1024 Jun 4, 2021
b442490
feat: google analytics for scene (#10)
HideBa Jun 4, 2021
06cd446
fix: Invisible layer issue in published project (#7)
yk-eukarya Jun 7, 2021
c31bdb6
test: pkg/id (#4)
yk-eukarya Jun 8, 2021
5bc0894
chore: fix godoc workflow
rot1024 Jun 8, 2021
5f808b7
chore: fix godoc workflow
rot1024 Jun 8, 2021
9f8e11d
chore: fix godoc workflow
rot1024 Jun 8, 2021
150550d
chore: fix godoc workflow
rot1024 Jun 8, 2021
ef75dd0
fix updateme payload (#14)
mimoham24 Jun 15, 2021
5b7a5fd
feat: create installable plugins (#1)
mimoham24 Jun 18, 2021
888fe01
feat: add thumbnail, author fields on plugin metadata query (#15)
HideBa Jun 23, 2021
f726b6e
Create pull_request_template.md
HideBa Jun 23, 2021
aebac3f
feat: published page api (#11)
rot1024 Jun 25, 2021
25da0d1
fix: dataset link merge bug #378 (#18)
yk-eukarya Jul 7, 2021
dcb4b08
fix: ogp image for published page (#17)
yk-eukarya Jul 7, 2021
2ef7efd
feat: import dataset from google sheets (#16)
yk-eukarya Jul 8, 2021
5213f3c
feat: add scenePlugin resolver to layers (#20)
rot1024 Jul 9, 2021
c599559
revert: "fix: ogp image for published page" (#21)
rot1024 Jul 13, 2021
cd07c0d
raise graphql complexity limit 4000->6000 (#22)
KaWaite Jul 13, 2021
bb9e4c6
feat: marker label position
rot1024 Jul 13, 2021
a2059e9
fix: change default value of marker label position
rot1024 Jul 13, 2021
077558c
fix: import dataset from google sheet bug (#23)
yk-eukarya Jul 14, 2021
8469574
fix: public api param
rot1024 Jul 14, 2021
ba7d164
fix: replace strings.Split() with strings.field() (#25)
mimoham24 Jul 16, 2021
e82b548
fix: project public image type
rot1024 Jul 16, 2021
a9d2091
docs: refine readme (#28)
HideBa Jul 26, 2021
8ad1f80
fix: published API (#27)
rot1024 Jul 26, 2021
5dd3dba
feat: Refine dataset import (#26)
yk-eukarya Jul 28, 2021
f7866e5
chore: use go:embed (#24)
rot1024 Jul 30, 2021
78ac136
fix: plugin manifest parser bugs (#32)
rot1024 Jul 30, 2021
a3f8b6d
refactor: pkg/error (#31)
rot1024 Jul 30, 2021
da7506e
Fix issue where assets not seen (#34)
KaWaite Aug 3, 2021
8742dba
feat: plugin upload and deletion (#33)
rot1024 Aug 4, 2021
0b8c007
fix: dataset layers are not exported correctly (#36)
mimoham24 Aug 6, 2021
d8c8cda
fix: hide parent infobox fields when child infobox is not nil (#37)
mimoham24 Aug 6, 2021
be00da9
fix: mongo.PropertySchema.FindByIDs, propertySchemaID.Equal
rot1024 Aug 9, 2021
a4770ec
fix: gql propertySchemaGroup.translatedTitle resolver
rot1024 Aug 9, 2021
8a64591
fix: use PropertySchemaID.Equal
rot1024 Aug 9, 2021
41c3771
chore: add internal error log
rot1024 Aug 9, 2021
1c3cf15
fix: use PropertySchemaID.Equal
rot1024 Aug 9, 2021
108711a
feat: new primitives, new properties on primitives
rot1024 Aug 9, 2021
080ab97
fix: tweak field names of model primitive
rot1024 Aug 13, 2021
0f800fe
make fetch url support unicode chars (#38)
yk-eukarya Aug 24, 2021
2e4f52a
feat: set scene theme (#35)
yk-eukarya Aug 25, 2021
cc63cdb
docs: add badges to readme [skip ci]
rot1024 Aug 27, 2021
2a1d4fd
refactor: graphql adapter (#40)
rot1024 Aug 31, 2021
02b17f1
fix: layer importing bug (#41)
mimoham24 Aug 31, 2021
90c3279
fix: skip nil geometries (#42)
mimoham24 Sep 2, 2021
3651e21
chore: support multiple platform docker image
rot1024 Sep 3, 2021
3b5f93d
chore: stop using upx as it doesn't work on arm64
rot1024 Sep 3, 2021
d3360b3
refactor: reorganize graphql schema (#43)
rot1024 Sep 7, 2021
33f4c7c
chore: update golang version and modules (#51)
mimoham24 Sep 16, 2021
94611f9
feat: widget align system (#19)
KaWaite Sep 24, 2021
a7daf79
fix: validate widget extended when moved
rot1024 Sep 26, 2021
98db7e0
fix: widget extended validation
rot1024 Sep 26, 2021
d236bed
fix: nil error in mongodoc plugin
rot1024 Sep 26, 2021
eb1db48
fix: add widget to default location
rot1024 Sep 26, 2021
92d1373
fix: invalid extension data from GraphQL, plugin manifest schema impr…
rot1024 Sep 28, 2021
0a658a8
fix: translated fields in plugin gql
rot1024 Sep 29, 2021
579b7a5
fix: fallback widgetLocation
Oct 1, 2021
f04710a
Add singleOnly to extension (#60)
KaWaite Oct 11, 2021
65ae322
chore: updating modules (#62)
mimoham24 Oct 20, 2021
163fcf8
feat: tag system (#67)
mimoham24 Oct 25, 2021
fbcdef3
chore: add github workflows to release
rot1024 Nov 1, 2021
fc93f2d
v0.1.0
rot1024 Nov 1, 2021
cfc79a0
chore: fix release workflow, fix build comment [skip ci]
rot1024 Nov 1, 2021
1d29f5c
v0.1.0
rot1024 Nov 1, 2021
96f0b36
chore: fix renaming file names in release workflow
rot1024 Nov 1, 2021
3308525
v0.1.0
rot1024 Nov 1, 2021
d5466be
chore: fix and refactor release workflow [skip ci]
rot1024 Nov 1, 2021
632116f
v0.1.0
rot1024 Nov 1, 2021
25c5810
feat: support opentelemetry (#68)
int-tt Nov 2, 2021
9ece9e8
refactor: add PropertySchemaGroupID to pkg/id (#70)
rot1024 Nov 5, 2021
4a9dc5d
chore: fix typo in github actions
rot1024 Nov 8, 2021
b5b01bb
chore: clean up unused code
rot1024 Nov 8, 2021
10f7453
fix: add an index to mongo project collection to prevent creating pro…
rot1024 Nov 8, 2021
443f2c8
fix: check project alias duplication on project update
rot1024 Nov 8, 2021
d54309f
chore: update codecov.yml to add ignored files
rot1024 Nov 12, 2021
9d3822d
chore: ignore generated files in codecov
rot1024 Nov 12, 2021
2159474
chore: upgrade dependencies
rot1024 Nov 16, 2021
afe6c0a
v0.2.0
rot1024 Nov 18, 2021
a26ff03
wrap with double quotation (#78)
mimoham24 Nov 18, 2021
a8b7f18
ci: skip release action at folk repos, hide ci changes from changelog
rot1024 Nov 19, 2021
3512c0d
feat: clusters for scenes (#75)
mimoham24 Nov 22, 2021
2b57b1a
chore: fix plugin manifest JSON schema
rot1024 Nov 26, 2021
8693b48
feat: add fields of scene property for terrain
rot1024 Nov 26, 2021
5e3d253
fix: terrain fields of scene property
rot1024 Nov 26, 2021
73143b7
refactor: make property.Value and dataset.Value independent in pkg/va…
rot1024 Nov 26, 2021
2ddbc8b
fix: numbers are not decoded from gql to value
rot1024 Dec 6, 2021
91f9b39
docs: add pkg.go.dev badge to readme
rot1024 Dec 13, 2021
63c5823
feat: camera limiter (#87)
issmail-basel Dec 15, 2021
c4fb9a5
fix: layers have their own tags separate from the scene (#90)
HideBa Dec 17, 2021
1b99c6d
fix: return property with clusters data (#89)
issmail-basel Dec 17, 2021
755ef78
ci: delete godoc job [ci skip]
rot1024 Dec 17, 2021
b20082e
ci: add renovate.json [ci skip]
rot1024 Dec 17, 2021
16f20d3
ci: fix renovate.json [ci skip]
rot1024 Dec 17, 2021
ba4b18f
fix: cast values, rename value.OptionalValue (#93)
rot1024 Dec 21, 2021
db4ceaf
fix: synchronize mongo migration (#94)
rot1024 Dec 23, 2021
8b0c250
v0.3.0
rot1024 Jan 11, 2022
5cdb5d5
ci: use golangci-lint-action
rot1024 Jan 14, 2022
1265ac9
refactor: pkg/id, use ID aliases, move JSON schemas (#97)
rot1024 Jan 14, 2022
ee144e1
ci: use golangci-lint-action in pr workflow
rot1024 Jan 14, 2022
691cb78
perf: add indexes of mongo collections (#98)
rot1024 Jan 17, 2022
bbe13d8
ci: update github action dependencies (#92)
renovate[bot] Jan 17, 2022
0d112c5
refactor: unit tests (#99)
rot1024 Jan 18, 2022
5591948
feat: add "clamp to ground" option to file primitive (#95)
HideBa Jan 21, 2022
ddd0dbf
feat: Infobox and text block padding (#100)
mimoham24 Jan 21, 2022
17a463d
refactor: pkg/property, pkg/layer, pkg/plugin (#101)
rot1024 Jan 25, 2022
9a8b025
ci: update github workflows
rot1024 Jan 25, 2022
b158e13
ci: fix github workflows
rot1024 Jan 25, 2022
98ac44b
ci: fix github workflows [ci skip]
rot1024 Jan 25, 2022
0166255
ci: fix github workflows [ci skip]
rot1024 Jan 25, 2022
3a34d02
ci: update github release workflow [ci skip]
rot1024 Jan 27, 2022
b398db3
v0.4.0
rot1024 Jan 27, 2022
805d788
fix: scene exporter should export layers and tags while maintaining t…
rot1024 Feb 1, 2022
01a4e67
refactor: graphql resolvers (#105)
rot1024 Feb 2, 2022
d0c1bfd
update go modules (#103)
yk-eukarya Feb 4, 2022
7002696
feat: implement property.Diff and plugin/manifest.Diff (#107)
rot1024 Feb 9, 2022
67a618e
feat: support 3rd party plugin translation (#109)
rot1024 Feb 9, 2022
7aebcd0
feat: improve the Infobox style (manifest) (#110)
mimoham24 Feb 14, 2022
1738812
chore: update all dependencies (#111)
renovate[bot] Feb 15, 2022
1ad0cec
ci: update renovate config
rot1024 Feb 15, 2022
2dc1927
feat: overwrite installation of new plug-ins without removing (automa…
rot1024 Feb 15, 2022
6084365
feat: update infobox style fields (#115)
mimoham24 Feb 16, 2022
5009c5e
fix: property field in groups in list cannot be updated correctly
rot1024 Feb 17, 2022
861c4bb
fix: scenes and properties are not updated properly when plugin is up…
rot1024 Feb 18, 2022
f66f9a3
fix: scene widgets and blocks are not update properly when plugin is …
rot1024 Feb 18, 2022
fbbca4d
chore: increase batch size of db migration [ci skip]
rot1024 Feb 22, 2022
7501062
ci: add CODEOWNERS [ci skip]
rot1024 Feb 22, 2022
6979a8d
v0.5.0
issmail-basel Feb 24, 2022
496099c
ci: update renovate schedule (#121)
KaWaite Mar 4, 2022
d1a38e2
chore: update dependencies (#117)
renovate[bot] Mar 7, 2022
7843321
perf: reduce database queries to obtain scene IDs (#119)
rot1024 Mar 7, 2022
db72827
ci: update github actions dependencies (major) (#118)
renovate[bot] Mar 9, 2022
b89c323
feat: authentication system (#108)
yk-eukarya Mar 11, 2022
9bde8a4
fix: load auth client domain from config (#124)
yk-eukarya Mar 11, 2022
27c2f0c
fix: signup fails when password is not set
rot1024 Mar 14, 2022
aab26c3
feat: default mailer that outputs mails into stdout
rot1024 Mar 14, 2022
d1e3a8c
fix: logger panics
rot1024 Mar 15, 2022
83a66a4
fix: set auth server dev mode automatically
rot1024 Mar 15, 2022
82cf28c
refactor: remove filter args from repos to prevent implementation err…
rot1024 Mar 15, 2022
ce23099
fix: auth server bugs and auth client bugs (#125)
yk-eukarya Mar 16, 2022
7399434
feat: assets filtering & pagination (#81)
KaWaite Mar 16, 2022
232e75e
fix: auth0 setting is not used by JWT verification middleware
rot1024 Mar 16, 2022
7caf68f
fix: invalid mongo queries of pagination
rot1024 Mar 16, 2022
570fe7a
fix: auth config not loaded expectedly
rot1024 Mar 17, 2022
5df25f2
fix: users cannot creates a new team and scene
rot1024 Mar 17, 2022
982a71a
fix: auth server certificate is not saved as pem format
rot1024 Mar 17, 2022
f4cc3f9
fix: repo filters are not merged expectedly
rot1024 Mar 17, 2022
690a914
fix end points disabling config (#126)
yk-eukarya Mar 18, 2022
3f2582c
refactor: http api to export layers
rot1024 Mar 23, 2022
58a6d13
fix: auth is no longer required for GraphQL endpoint
rot1024 Mar 23, 2022
89adc36
fix: rename auth srv default client ID (#128)
rot1024 Mar 24, 2022
dccd9c7
ci: fix deploy_test github actions
rot1024 Mar 24, 2022
47be6ab
fix: signup API is disabled when auth server is disabled, users and a…
rot1024 Mar 31, 2022
3cbb456
fix: auth to work with zero config (#131)
yk-eukarya Apr 4, 2022
fef60e6
feat: support sign up with information provided by OIDC providers (#130)
rot1024 Apr 6, 2022
3e6dff1
fix: property.SchemaListMap.List test fails
rot1024 Apr 6, 2022
10691ac
fix: errors when auth srv domain is not specified
rot1024 Apr 6, 2022
6480734
fix: errors when auth srv domain is not specified
rot1024 Apr 6, 2022
83f9b13
chore: update docker-compose config
rot1024 Apr 6, 2022
cb6ca40
fix: login redirect does not work
rot1024 Apr 7, 2022
adeda41
chore: add log for GraphQL Playground endpoint (#133)
yk-eukarya Apr 7, 2022
0c0e28c
fix: enable auth srv dev mode when no domain is specified
rot1024 Apr 7, 2022
e96f78a
fix: add a trailing slash to jwt audiences
rot1024 Apr 7, 2022
0ce79ff
fix: allow separate auth server ui domain
rot1024 Apr 8, 2022
db6ff77
v0.6.0
rot1024 Apr 8, 2022
1b9b6be
chore: update dependencies (#134)
yk-eukarya Apr 11, 2022
82843fa
fix: renovate bot not running on schedule (#136)
KaWaite Apr 18, 2022
e272172
ci: fix renovate schedule syntax
KaWaite Apr 18, 2022
9851004
fix: aud was changed and jwt could not be validated correctly
rot1024 Apr 19, 2022
7ec76aa
fix: auth audiences were unintentionally required
rot1024 Apr 20, 2022
04a098d
refactor: introduce generics, reorganize GraphQL schema (#135)
rot1024 Apr 20, 2022
742be87
v0.6.1
issmail-basel Apr 20, 2022
a793761
fix: signup api requires password field
rot1024 Apr 20, 2022
2c02203
chore: typo `secrit` on env example (#137)
KeisukeYamashita Apr 26, 2022
4f72b87
feat: add an opacity slider to map tiles (#138)
KaWaite May 10, 2022
35f9db5
test: add Mongo Asset's `FindByID` unit testing (#139)
KeisukeYamashita May 11, 2022
58e1b02
fix: "$in needs an array" error from mongo FindByIDs (#142)
rot1024 May 11, 2022
cb82d05
ci: bump `actions/cache` to `v3` (#140)
KeisukeYamashita May 11, 2022
751e666
test: refactor mongo connect helper function
rot1024 May 11, 2022
c2b969f
test: util.SyncMap.Range test sometimes fails (#143)
rot1024 May 11, 2022
651852d
fix: name field is available again in signup api (#144)
rot1024 May 11, 2022
ddaeaae
refactor: retry mongo lock (#145)
rot1024 May 11, 2022
89009ba
chore: update the go modules (#146)
yk-eukarya May 13, 2022
b98406c
fix createTagItem mutation (#147)
mimoham24 May 13, 2022
84fe132
v0.7.0
lavalse May 17, 2022
a21ace6
Feat: add the property of scene mode (#148)
airslice May 20, 2022
6372bce
chore: update go modules (#150)
yk-eukarya May 24, 2022
696f35b
Refactor: Update scene mode key (#152)
airslice May 27, 2022
c6e98c0
refactor: declarative description of use case structure (asset only) …
rot1024 May 27, 2022
602ec07
feat: add timeline settings to scene property (#153)
rot1024 May 31, 2022
e444e4e
fix: assets are not saved when files are uploaded (#155)
rot1024 Jun 3, 2022
ab6334a
feat: add totalCount field to DatasetSchema type of GraphQL schema (#…
keiya01 Jun 3, 2022
04e8e43
ci: set up release workflow (#156)
rot1024 Jun 13, 2022
1707830
ci: create rc release for release branch (#157)
rot1024 Jun 14, 2022
dea1b0b
ci: fix build workflow
rot1024 Jun 14, 2022
5b0c43f
ci: fix build workflow
rot1024 Jun 14, 2022
be3fc2a
ci: fix stage workflow
rot1024 Jun 14, 2022
00b5c0e
ci: fix stage workflow
rot1024 Jun 14, 2022
84dc506
ci: update build and deploy_test workflows
rot1024 Jun 14, 2022
5cf0f9b
ci: fix build workflow
rot1024 Jun 14, 2022
e9ed0f0
ci: fix deploy_test workflow
rot1024 Jun 14, 2022
647eb4f
ci: fix workflows
rot1024 Jun 17, 2022
5181985
ci: fix build workflow
rot1024 Jun 17, 2022
6d0872a
ci: fix ci and build workflow
rot1024 Jun 17, 2022
362d418
ci: fix build workflow
rot1024 Jun 17, 2022
413ba3f
ci: fix build workflow
rot1024 Jun 17, 2022
a6553e2
ci: fix build workflow
rot1024 Jun 17, 2022
64d6464
v0.8.0
rot1024 Jun 17, 2022
164eba4
ci: simplify if in build workflow
rot1024 Jun 17, 2022
5afc81b
test: unit test for mongo auth request repo (#159)
yuuri111 Jun 20, 2022
0267f1d
feat: change layer indicators from preset list from backend side (#158)
nina992 Jul 4, 2022
67780bc
chore: update Makefile to remove unused targets
rot1024 Jul 7, 2022
62dede2
ci: update changelog config
rot1024 Jul 19, 2022
358237b
fix: property fields in a property list cannot be removed (#160)
yk-eukarya Jul 19, 2022
0e2daac
ci: fix release workflow
rot1024 Jul 19, 2022
db6d132
v0.9.0
Jul 20, 2022
895a648
chore: fix changelog [skip ci]
rot1024 Jul 20, 2022
70fed0b
chore: add new frontend endpoint (for Vite@3)
KaWaite Aug 3, 2022
61b03ab
feat: configurable server host
rot1024 Aug 3, 2022
897976c
feat: setup timeline buitlin widget (#161)
keiya01 Aug 8, 2022
12c6dfb
v0.10.0
Aug 10, 2022
276ef5f
feat: installing plugins from marketplace (#162)
rot1024 Aug 12, 2022
47c3e7f
Merge branch 'main' of github.com:reearth/reearth-backend into Keisuk…
KeisukeYamashita Aug 13, 2022
6c6edf3
ci: fix github workflows, dockefile, vscode settings
KeisukeYamashita Aug 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* @rot1024
/server/pkg/builtin/manifest.yml @HideBa
/server/pkg/builtin/manifest_ja.yml @HideBa
19 changes: 19 additions & 0 deletions .github/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
prefixes:
feat: 🚀 Features
fix: 🔧 Bug Fixes
docs: 📖 Documentation
doc: 📖 Documentation
perf: ⚡️ Performance
refactor: ✨ Refactor
style: 🎨 Styling
test: 🧪 Testing
chore: Miscellaneous Tasks
build: Miscellaneous Tasks
deps: Miscellaneous Tasks
ci: false
revert: false
scopes:
web: Web
server: Server
"": Misc
titleVersionPrefix: remove
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
web:
- web/**/*
server:
- server/**/*
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Overview

## What I've done


## What I haven't done

## How I tested

## Which point I want you to review particularly

## Memo
58 changes: 58 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"extends": [
"config:base",
":semanticCommits",
":semanticCommitScopeDisabled",
":maintainLockFilesWeekly",
":enableVulnerabilityAlertsWithLabel(security)"
],
"postUpdateOptions": [
"gomodTidy",
"gomodUpdateImportPaths"
],
"packageRules": [
{
"enabledManagers": [
"gomod"
],
"matchPackagePatterns": [
"*"
],
"groupName": "dependencies",
"groupSlug": "gomod",
"semanticCommitType": "chore",
"schedule": [
"before 3:00 am on the 4th day of the month"
]
},
{
"enabledManagers": [
"dockerfile",
"docker-compose"
],
"matchPackagePatterns": [
"*"
],
"groupName": "docker dependencies",
"groupSlug": "docker",
"semanticCommitType": "chore",
"schedule": [
"before 3:00 am on the 4th day of the month"
]
},
{
"enabledManagers": [
"github-actions"
],
"matchPackagePatterns": [
"*"
],
"groupName": "github actions dependencies",
"groupSlug": "github-actions",
"semanticCommitType": "ci",
"schedule": [
"before 3am on the fourth day of the month"
]
}
]
}
186 changes: 186 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
name: build
on:
workflow_run:
workflows: [ci]
types: [completed]
branches: [main, release]
concurrency:
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
cancel-in-progress: true
jobs:
info:
name: Collect information
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion != 'failure' && github.event.repository.full_name == 'reearth/reearth' && (github.event.workflow_run.head_branch == 'release' || !startsWith(github.event.head_commit.message, 'v'))
outputs:
sha_short: ${{ steps.info.outputs.sha_short }}
tag: ${{ steps.info.outputs.tag }}
tag_short: ${{ steps.info.outputs.tag_short }}
name: ${{ steps.info.outputs.name }}
steps:
- name: checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.workflow_run.head_sha }}
- name: Fetch tags
run: git fetch --prune --unshallow --tags
- name: Get info
id: info
env:
BRANCH: ${{ github.event.workflow_run.head_branch }}
# The tag name should be retrieved lazily, as tagging may be delayed.
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
if [[ "$BRANCH" = "release" ]]; then
TAG=$(git tag --points-at HEAD)
if [[ ! -z "$TAG" ]]; then
echo "::set-output name=tag::$TAG"
echo "::set-output name=tag_short::${TAG#v}"
else
echo "::set-output name=name::rc"
fi
else
echo "::set-output name=name::nightly"
fi
- name: Show info
env:
SHA_SHORT: ${{ steps.info.outputs.sha_short }}
TAG: ${{ steps.info.outputs.tag }}
TAG_SHORT: ${{ steps.info.outputs.tag_short }}
NAME: ${{ steps.info.outputs.name }}
run: echo "sha_short=$SHA_SHORT, tag=$TAG, tag_short=$TAG_SHORT, name=$NAME"
build:
name: Build and release
runs-on: ubuntu-latest
needs:
- info
if: needs.info.outputs.name || needs.info.outputs.tag
env:
ARTIFACTS: server/dist/reearth_*.*,reearth-web_${{ needs.info.outputs.name }}.tar.gz
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_sha }}
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Fetch reearth-web release
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: reearth/reearth-web
version: tags/${{ needs.info.outputs.name }}
file: reearth-web_${{ needs.info.outputs.name }}.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
args: release --rm-dist ${{ env.SNAPSHOT }}
workdir: server
env:
SNAPSHOT: ${{ !needs.info.outputs.tag && '--snapshot' || '' }}
GORELEASER_CURRENT_TAG: ${{ needs.info.outputs.tag || '0.0.0' }}
- name: Rename artifacts
if: needs.info.outputs.name
run: for f in $ARTIFACTS; do mv $f $(echo $f | sed -E 's/_0\.0\.0-SNAPSHOT-[^_]*/_${{ needs.info.outputs.name }}/'); done
working-directory: server
- name: List artifacts
run: ls -l server/dist
- name: Release nightly/rc
if: needs.info.outputs.name
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: ${{ env.ARTIFACTS }}
commit: ${{ github.sha }}
name: ${{ needs.info.outputs.name }}
tag: ${{ needs.info.outputs.name }}
body: ${{ github.sha }}
prerelease: true
- name: Download latest changelog
if: needs.info.outputs.tag
uses: dawidd6/action-download-artifact@v2
with:
workflow: release.yml
name: changelog-${{ needs.info.outputs.tag }}
- name: Create GitHub release
if: needs.info.outputs.tag
uses: ncipollo/release-action@v1
with:
artifacts: ${{ env.ARTIFACTS }}
commit: ${{ github.sha }}
name: ${{ needs.info.outputs.tag }}
tag: ${{ needs.info.outputs.tag }}
bodyFile: CHANGELOG_latest.md
docker:
name: Build and push Docker image
runs-on: ubuntu-latest
needs:
- info
if: needs.info.outputs.name || needs.info.outputs.tag
env:
IMAGE_NAME: reearth/reearth
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.workflow_run.head_sha }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get options
id: options
env:
TAG: ${{ needs.info.outputs.tag_short }}
NAME: ${{ needs.info.outputs.name }}
SHA: ${{ needs.info.outputs.sha_short }}
run: |
if [[ -n $TAG ]]; then
PLATFORMS=linux/amd64,linux/arm64
VERSION=$TAG
TAGS=$IMAGE_NAME:$TAG
if [[ ! $TAG =~ '-' ]]; then
TAGS+=,${IMAGE_NAME}:${TAG%.*}
TAGS+=,${IMAGE_NAME}:${TAG%%.*}
TAGS+=,${IMAGE_NAME}:latest
fi
else
PLATFORMS=linux/amd64
VERSION=$SHA
TAGS=$IMAGE_NAME:$NAME
fi
echo "::set-output name=platforms::$PLATFORMS"
echo "::set-output name=version::$VERSION"
echo "::set-output name=tags::$TAGS"
- name: Fetch reearth-web release
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: reearth/reearth-web
version: tags/${{ needs.info.outputs.name }}
file: reearth-web_${{ needs.info.outputs.name }}.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
- name: Extract reearth-web
run: tar -xvf reearth-web_${{ needs.info.outputs.name }}.tar.gz && mv reearth-web web/dist
- name: Build and push docker image
uses: docker/build-push-action@v3
with:
platforms: ${{ steps.options.outputs.platforms }}
push: true
build-args: VERSION=${{ steps.options.outputs.version }}
tags: ${{ steps.options.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Invoke deploy_test workflow
uses: benc-uk/workflow-dispatch@v1
if: needs.info.outputs.name == 'nightly'
with:
workflow: deploy_test
token: ${{ secrets.GPT }}
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI
on:
push:
branches: [main, release]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: CI
runs-on: ubuntu-latest
if: github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'v')
services:
mongo:
image: mongo:4.4-focal
ports:
- 27017:27017
steps:
- name: set up
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: checkout
uses: actions/checkout@v3
- name: cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.45 # v1.46 reports an error
args: --timeout=10m
working-directory: server
- name: test
run: go test ./... -v -race -coverprofile=coverage.txt -covermode=atomic -timeout 10m
env:
REEARTH_DB: mongodb://localhost
working-directory: server
- name: Send coverage report
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.txt
35 changes: 35 additions & 0 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: deploy_test
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
env:
IMAGE: reearth/reearth:nightly
IMAGE_GCP: us.gcr.io/reearth-oss/reearth:nightly
GCP_REGION: us-central1
jobs:
deploy_test:
name: Deploy app to test env
runs-on: ubuntu-latest
if: github.event.repository.full_name == 'reearth/reearth'
steps:
- uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Configure docker
run: gcloud auth configure-docker --quiet
- name: docker push
run: |
docker pull $IMAGE
docker tag $IMAGE $IMAGE_GCP
docker push $IMAGE_GCP
- name: Deploy to Cloud Run
run: |
gcloud run deploy reearth-backend \
--image $IMAGE_GCP \
--region $GCP_REGION \
--platform managed \
--quiet