Compare commits
No commits in common. "main" and "1.0.0" have entirely different histories.
6 changed files with 44 additions and 50 deletions
|
@ -1,6 +1,4 @@
|
||||||
---
|
---
|
||||||
name: 'main'
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
@ -18,8 +16,8 @@ jobs:
|
||||||
make tidy no-dirty
|
make tidy no-dirty
|
||||||
- name: 'check'
|
- name: 'check'
|
||||||
run: |
|
run: |
|
||||||
make check no-dirty
|
make check tidy no-dirty
|
||||||
main:
|
build:
|
||||||
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
|
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
|
||||||
needs:
|
needs:
|
||||||
- 'test'
|
- 'test'
|
||||||
|
@ -36,8 +34,41 @@ jobs:
|
||||||
make build
|
make build
|
||||||
env:
|
env:
|
||||||
GIT_CRYPT_SECRET: '${{ secrets.GIT_CRYPT }}'
|
GIT_CRYPT_SECRET: '${{ secrets.GIT_CRYPT }}'
|
||||||
- name: 'deploy'
|
- uses: 'actions/upload-artifact@v3'
|
||||||
run: |
|
with:
|
||||||
make deploy
|
if-no-files-found: 'error'
|
||||||
|
name: 'ods'
|
||||||
|
path: 'ods'
|
||||||
|
deploy:
|
||||||
|
needs:
|
||||||
|
- 'build'
|
||||||
|
runs-on: 'self-hosted'
|
||||||
|
steps:
|
||||||
|
- uses: 'actions/download-artifact@v3'
|
||||||
|
with:
|
||||||
|
name: 'ods'
|
||||||
|
- run: |
|
||||||
|
umask 077
|
||||||
|
printf '%s' "$SSH_PRIVATE_KEY" | base64 -d > private_key
|
||||||
|
SSHOPTS="-i private_key -o StrictHostKeyChecking=accept-new"
|
||||||
|
rsync -e "ssh ${SSHOPTS}" ods ods@ods.adyxax.org:
|
||||||
|
ssh ${SSHOPTS} ods@ods.adyxax.org "chmod +x ods; systemctl --user restart ods"
|
||||||
env:
|
env:
|
||||||
SSH_PRIVATE_KEY: '${{ secrets.SSH_PRIVATE_KEY }}'
|
SSH_PRIVATE_KEY: '${{ secrets.SSH_PRIVATE_KEY }}'
|
||||||
|
publish:
|
||||||
|
needs:
|
||||||
|
- 'build'
|
||||||
|
runs-on: 'self-hosted'
|
||||||
|
steps:
|
||||||
|
- uses: 'actions/download-artifact@v3'
|
||||||
|
with:
|
||||||
|
name: 'ods'
|
||||||
|
- uses: 'actions/forgejo-release@v2'
|
||||||
|
with:
|
||||||
|
direction: 'upload'
|
||||||
|
tag: '${{ github.ref_name }}'
|
||||||
|
sha: '${{ github.sha }}'
|
||||||
|
release-dir: './'
|
||||||
|
token: '${{ env.GITHUB_TOKEN }}'
|
||||||
|
hide-archive-link: true
|
||||||
|
release-notes-assistant: true
|
||||||
|
|
18
CHANGELOG.md
18
CHANGELOG.md
|
@ -2,24 +2,6 @@
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## 1.0.3 - 2025-06-06
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- Updated dependencies.
|
|
||||||
|
|
||||||
## 1.0.2 - 2025-05-11
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- Updated dependencies.
|
|
||||||
|
|
||||||
## 1.0.1 - 2025-04-07
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- Updated dependencies.
|
|
||||||
|
|
||||||
## 1.0.0 - 2025-03-15
|
## 1.0.0 - 2025-03-15
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
13
GNUmakefile
13
GNUmakefile
|
@ -37,17 +37,8 @@ push: tidy no-dirty check ## push changes to git remote
|
||||||
|
|
||||||
.PHONY: deploy
|
.PHONY: deploy
|
||||||
deploy: build ## deploy changes to the production server
|
deploy: build ## deploy changes to the production server
|
||||||
umask 077
|
rsync ./ods root@ods.adyxax.org:/usr/local/bin/
|
||||||
if [ -n "$${SSH_PRIVATE_KEY:-}" ]; then
|
ssh root@ods.adyxax.org "systemctl restart ods"
|
||||||
cleanup() {
|
|
||||||
rm -f private_key
|
|
||||||
}
|
|
||||||
trap cleanup EXIT
|
|
||||||
printf '%s' "$$SSH_PRIVATE_KEY" | base64 -d > private_key
|
|
||||||
SSHOPTS="-i private_key -o StrictHostKeyChecking=accept-new"
|
|
||||||
fi
|
|
||||||
rsync -e "ssh $${SSHOPTS:-}" ./ods ods@ods.adyxax.org:
|
|
||||||
ssh $${SSHOPTS:-} ods@ods.adyxax.org "chmod +x ods; systemctl --user restart ods"
|
|
||||||
|
|
||||||
##### Utils ####################################################################
|
##### Utils ####################################################################
|
||||||
.PHONY: confirm
|
.PHONY: confirm
|
||||||
|
|
10
README.md
10
README.md
|
@ -16,13 +16,6 @@ help` if running BSD) to see the possible actions.
|
||||||
|
|
||||||
Use `make build` to build a static binary of the service, embedding everything.
|
Use `make build` to build a static binary of the service, embedding everything.
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
ODS can be configured by setting the following environment variables:
|
|
||||||
- `ODS_DEBUG`: Set this to a non empty string to activate debug logs.
|
|
||||||
- `ODS_HOST`: Hostname or address to listen on, defaults to `127.0.0.1`.
|
|
||||||
- `ODS_PORT`: TCP port to listen on, defaults to `8080`.
|
|
||||||
|
|
||||||
## The dictionary
|
## The dictionary
|
||||||
|
|
||||||
The "Officiel Du Scrabble" (ODS for short) is what the official dictionary for
|
The "Officiel Du Scrabble" (ODS for short) is what the official dictionary for
|
||||||
|
@ -46,9 +39,6 @@ Description=ods.adyxax.org service
|
||||||
Environment="ODS_PORT=8090"
|
Environment="ODS_PORT=8090"
|
||||||
ExecStart=/usr/local/bin/ods
|
ExecStart=/usr/local/bin/ods
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Nginx reverse proxy
|
## Nginx reverse proxy
|
||||||
|
|
4
go.mod
4
go.mod
|
@ -1,5 +1,5 @@
|
||||||
module git.adyxax.org/adyxax/ods
|
module git.adyxax.org/adyxax/ods
|
||||||
|
|
||||||
go 1.24.4
|
go 1.24.1
|
||||||
|
|
||||||
require golang.org/x/text v0.26.0
|
require golang.org/x/text v0.23.0
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -1,2 +1,2 @@
|
||||||
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
|
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
|
||||||
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
|
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue