-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new: add files upload * new: ` /api/secrets` endpoint dumps all feed names and secrets to console * fix: refactor PIN modal and input * Major refactor and updates
- Loading branch information
Showing
42 changed files
with
10,693 additions
and
4,562 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,43 @@ | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
release: | ||
name: release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
# Checkout code | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Fetch tags | ||
- run: git fetch --force --tags | ||
|
||
# Set version environment | ||
- name: Set VERSION | ||
run: | | ||
echo "YBFEED_VERSION=`git describe --tags`" >> $GITHUB_ENV | ||
# Build web ui | ||
- name: Use Node.js 22.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 22.x | ||
- run: corepack enable | ||
working-directory: ./web/ui | ||
- run: yarn | ||
working-directory: ./web/ui | ||
- run: yarn build | ||
working-directory: ./web/ui | ||
|
||
# Build docker image | ||
- uses: ko-build/[email protected] | ||
- run: GOFLAGS="-ldflags=-X=main.version=$YBFEED_VERSION" ko build -B --platform all --tags dev --sbom none ./cmd/ybfeed | ||
env: | ||
KO_DOCKER_REPO: ghcr.io/ybizeul |
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ web/ui/build/ | |
/ybFeed | ||
dist/ | ||
.vscode | ||
__debug* |
Binary file not shown.
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 |
---|---|---|
|
@@ -23,17 +23,21 @@ func (f *Feed) sendPushNotification() error { | |
// For each subscription we send the notification | ||
for _, subscription := range f.Config.Subscriptions { | ||
pnL.Logger.Debug("Sending push notification", slog.String("endpoint", subscription.Endpoint)) | ||
resp, _ := webpush.SendNotification([]byte(fmt.Sprintf("New item posted to feed %s", f.Name())), &subscription, &webpush.Options{ | ||
resp, err := webpush.SendNotification([]byte(fmt.Sprintf("New item posted to feed %s", f.Name())), &subscription, &webpush.Options{ | ||
Subscriber: "[email protected]", // Do not include "mailto:" | ||
VAPIDPublicKey: f.NotificationSettings.VAPIDPublicKey, | ||
VAPIDPrivateKey: f.NotificationSettings.VAPIDPrivateKey, | ||
TTL: 30, | ||
}) | ||
if err != nil { | ||
pnL.Logger.Error("Sending push notification failed:", slog.String("error", err.Error())) | ||
continue | ||
} | ||
if pnL.Level() == slog.LevelDebug { | ||
b, _ := io.ReadAll(resp.Body) | ||
pnL.Logger.Debug("Response", slog.String("resp", string(b)), slog.String("status", resp.Status)) | ||
} | ||
defer resp.Body.Close() | ||
//defer resp.Body.Close() | ||
} | ||
return nil | ||
} |
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.