mirror of
https://github.com/lone-cloud/prism
synced 2026-06-04 12:13:28 -07:00
rely on docker releases via CI
This commit is contained in:
parent
3b50d0e43d
commit
f68ae2fa47
6 changed files with 49 additions and 53 deletions
10
.github/workflows/docker.yml
vendored
10
.github/workflows/docker.yml
vendored
|
|
@ -7,7 +7,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: ${{ github.repository_owner }}/sup-server
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -32,17 +32,15 @@ jobs:
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=semver,pattern=v{{version}}
|
||||||
type=ref,event=pr
|
type=semver,pattern=v{{major}}.{{minor}}
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
file: ./server/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,6 @@ For the optional Proton Mail integration, SUP requires a server that runs Proton
|
||||||
|
|
||||||
### 1. Proton Mail Integration
|
### 1. Proton Mail Integration
|
||||||
|
|
||||||
> ⚠️ **Early Alpha**: Currently only `docker-compose.dev.yml` dev deployments are available.
|
|
||||||
|
|
||||||
A Proton Mail Bridge is optionally available if you want to receive push notifications for incoming emails.
|
A Proton Mail Bridge is optionally available if you want to receive push notifications for incoming emails.
|
||||||
|
|
||||||
> **Note:** The default Proton Mail Bridge image uses `shenxn/protonmail-bridge:build` which compiles from source and supports multiple architectures. For x86_64 systems, you can use `shenxn/protonmail-bridge:latest` (pre-built binary, smaller and faster). For ARM devices (Raspberry Pi), stick with `:build`.
|
> **Note:** The default Proton Mail Bridge image uses `shenxn/protonmail-bridge:build` which compiles from source and supports multiple architectures. For x86_64 systems, you can use `shenxn/protonmail-bridge:latest` (pre-built binary, smaller and faster). For ARM devices (Raspberry Pi), stick with `:build`.
|
||||||
|
|
@ -74,8 +72,6 @@ Note that the bridge will first need to sync all of your old emails before you c
|
||||||
|
|
||||||
### 2. Install SUP Server
|
### 2. Install SUP Server
|
||||||
|
|
||||||
> ⚠️ **Early Alpha**: Currently only `docker-compose.dev.yml` dev deployments are available.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Download docker-compose.yml
|
# Download docker-compose.yml
|
||||||
curl -L -O https://raw.githubusercontent.com/lone-cloud/sup/master/docker-compose.yml
|
curl -L -O https://raw.githubusercontent.com/lone-cloud/sup/master/docker-compose.yml
|
||||||
|
|
@ -148,9 +144,9 @@ docker compose -f docker-compose.dev.yml up protonmail-bridge
|
||||||
|
|
||||||
### Proton Mail Notifications
|
### Proton Mail Notifications
|
||||||
|
|
||||||
Receive instant Signal notifications when new emails arrive in your Proton Mail inbox.
|
Receive Signal notifications when new emails arrive in your Proton Mail inbox.
|
||||||
|
|
||||||
SUP monitors your Proton Mail account via the local Proton Mail Bridge and forwards email alerts through Signal. This relies on the same technology that a third-party email client like Thunderbird would be using to integrate with Proton Mail.
|
SUP monitors a Proton Mail account via the local bridge and forwards email alerts through Signal. This relies on the same technology that a third-party email client like Thunderbird would be using to integrate with Proton Mail.
|
||||||
|
|
||||||
### Home Assistant Alerts
|
### Home Assistant Alerts
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 20 KiB |
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sup",
|
"name": "sup",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"description": "Privacy-preserving push notifications using Signal as transport",
|
"description": "Privacy-preserving push notifications using Signal as transport",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
"build": "bun build --compile server/index.ts --outfile server/sup-server",
|
"build": "bun build --compile server/index.ts --outfile server/sup-server",
|
||||||
"check": "tsc --noEmit && biome check .",
|
"check": "tsc --noEmit && biome check .",
|
||||||
"fix": "biome check --write --unsafe .",
|
"fix": "biome check --write --unsafe .",
|
||||||
"docker:release": "bun run scripts/release-docker.ts"
|
"release": "bun run scripts/release.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "5.6.2",
|
"chalk": "5.6.2",
|
||||||
|
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
import { $ } from 'bun';
|
|
||||||
|
|
||||||
const registry = 'ghcr.io/lone-cloud';
|
|
||||||
const config = { name: 'sup-server', path: './server' };
|
|
||||||
|
|
||||||
try {
|
|
||||||
const packageJson = await Bun.file(`${config.path}/package.json`).json();
|
|
||||||
const version = `v${packageJson.version}`;
|
|
||||||
|
|
||||||
console.log(`Releasing ${config.name} ${version}...`);
|
|
||||||
|
|
||||||
const fullName = `${registry}/${config.name}`;
|
|
||||||
|
|
||||||
console.log(`\nBuilding ${config.name}...`);
|
|
||||||
await $`docker build -t ${fullName}:${version} -t ${fullName}:latest ${config.path}`;
|
|
||||||
console.log(`Built ${config.name}`);
|
|
||||||
|
|
||||||
console.log(`Pushing ${fullName}:${version}...`);
|
|
||||||
await $`docker push ${fullName}:${version}`;
|
|
||||||
console.log(`Pushed ${fullName}:${version}`);
|
|
||||||
|
|
||||||
console.log(`Pushing ${fullName}:latest...`);
|
|
||||||
await $`docker push ${fullName}:latest`;
|
|
||||||
console.log(`Pushed ${fullName}:latest`);
|
|
||||||
|
|
||||||
console.log(`
|
|
||||||
✨ ${config.name} ${version} released successfully!
|
|
||||||
|
|
||||||
Images pushed:
|
|
||||||
- ${fullName}:${version}
|
|
||||||
- ${fullName}:latest
|
|
||||||
|
|
||||||
Users can now pull with:
|
|
||||||
docker compose pull
|
|
||||||
`);
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Release failed:', error);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
41
scripts/release.ts
Normal file
41
scripts/release.ts
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
import { $ } from 'bun';
|
||||||
|
|
||||||
|
try {
|
||||||
|
const packageJson = await Bun.file(`package.json`).json();
|
||||||
|
const version = `v${packageJson.version}`;
|
||||||
|
|
||||||
|
console.log(`Triggering release ${version} via CI...`);
|
||||||
|
|
||||||
|
const existingTags = await $`git tag -l ${version}`.text();
|
||||||
|
if (existingTags.trim()) {
|
||||||
|
console.error(`\n❌ Tag ${version} already exists!`);
|
||||||
|
console.log(`\nTo re-release, delete the tag first:`);
|
||||||
|
console.log(` git tag -d ${version}`);
|
||||||
|
console.log(` git push origin :refs/tags/${version}`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`\nCreating git tag ${version}...`);
|
||||||
|
await $`git tag -a ${version} -m "Release ${version}"`;
|
||||||
|
|
||||||
|
console.log(`Pushing tag to trigger CI build...`);
|
||||||
|
await $`git push origin ${version}`;
|
||||||
|
|
||||||
|
console.log(`
|
||||||
|
✨ Release ${version} triggered!
|
||||||
|
|
||||||
|
GitHub Actions will now:
|
||||||
|
1. Build Docker images
|
||||||
|
2. Push to ghcr.io/lone-cloud/sup-server:${version}
|
||||||
|
3. Push to ghcr.io/lone-cloud/sup-server:latest
|
||||||
|
|
||||||
|
Watch the build:
|
||||||
|
https://github.com/lone-cloud/sup/actions
|
||||||
|
|
||||||
|
Once complete, images will be available:
|
||||||
|
docker pull ghcr.io/lone-cloud/sup-server:${version}
|
||||||
|
`);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Release failed:', error);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue